Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / InsufficientMemoryException.cs / 1305376 / InsufficientMemoryException.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: InsufficientMemoryException ** ** ** Purpose: The exception class for running out of memory ** but most likely in a non-fatal way that shouldn't ** be affected by escalation policy. Use this for cases ** like MemoryFailPoint or a TryAllocate method, where you ** expect OOM's with no shared state corruption and you ** want to recover from these errors. ** ** =============================================================================*/ namespace System { using System; using System.Runtime.Serialization; [Serializable] public sealed class InsufficientMemoryException : OutOfMemoryException { public InsufficientMemoryException() : base(GetMessageFromNativeResources(ExceptionMessageKind.OutOfMemory)) { SetErrorCode(__HResults.COR_E_INSUFFICIENTMEMORY); } public InsufficientMemoryException(String message) : base(message) { SetErrorCode(__HResults.COR_E_INSUFFICIENTMEMORY); } public InsufficientMemoryException(String message, Exception innerException) : base(message, innerException) { SetErrorCode(__HResults.COR_E_INSUFFICIENTMEMORY); } private InsufficientMemoryException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: InsufficientMemoryException ** ** ** Purpose: The exception class for running out of memory ** but most likely in a non-fatal way that shouldn't ** be affected by escalation policy. Use this for cases ** like MemoryFailPoint or a TryAllocate method, where you ** expect OOM's with no shared state corruption and you ** want to recover from these errors. ** ** =============================================================================*/ namespace System { using System; using System.Runtime.Serialization; [Serializable] public sealed class InsufficientMemoryException : OutOfMemoryException { public InsufficientMemoryException() : base(GetMessageFromNativeResources(ExceptionMessageKind.OutOfMemory)) { SetErrorCode(__HResults.COR_E_INSUFFICIENTMEMORY); } public InsufficientMemoryException(String message) : base(message) { SetErrorCode(__HResults.COR_E_INSUFFICIENTMEMORY); } public InsufficientMemoryException(String message, Exception innerException) : base(message, innerException) { SetErrorCode(__HResults.COR_E_INSUFFICIENTMEMORY); } private InsufficientMemoryException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ToolStripRenderer.cs
- ListViewSelectEventArgs.cs
- ZipIOExtraFieldPaddingElement.cs
- InkPresenterAutomationPeer.cs
- StylusPointPropertyUnit.cs
- PathParser.cs
- FormsAuthenticationTicket.cs
- FontStyleConverter.cs
- VirtualPath.cs
- ContractNamespaceAttribute.cs
- XmlDictionary.cs
- XamlSerializerUtil.cs
- MimeMultiPart.cs
- StringUtil.cs
- CapabilitiesAssignment.cs
- Drawing.cs
- ProfileGroupSettingsCollection.cs
- MaskedTextBoxTextEditorDropDown.cs
- PhysicalAddress.cs
- _FtpControlStream.cs
- ServerIdentity.cs
- ParamArrayAttribute.cs
- SqlGenerator.cs
- RootBuilder.cs
- ThemeableAttribute.cs
- RenderingBiasValidation.cs
- FlowDecisionDesigner.xaml.cs
- OracleSqlParser.cs
- PolicyStatement.cs
- ReturnValue.cs
- SafeRegistryHandle.cs
- SqlEnums.cs
- EventListener.cs
- SecurityTokenValidationException.cs
- RawStylusInputCustomData.cs
- BindingNavigator.cs
- CodeMemberEvent.cs
- RegionInfo.cs
- ScriptBehaviorDescriptor.cs
- FixUp.cs
- Point4D.cs
- DiscoveryClientElement.cs
- BindingListCollectionView.cs
- Annotation.cs
- ApplicationDirectory.cs
- TextRangeSerialization.cs
- CalendarDateRangeChangingEventArgs.cs
- SmiEventSink.cs
- ChtmlFormAdapter.cs
- RelOps.cs
- ServerType.cs
- StringStorage.cs
- MetabaseSettings.cs
- MaterialCollection.cs
- TextLineResult.cs
- WebBrowserDocumentCompletedEventHandler.cs
- XmlMemberMapping.cs
- _FtpDataStream.cs
- TreeNodeStyleCollection.cs
- __TransparentProxy.cs
- HTTPNotFoundHandler.cs
- VSDExceptions.cs
- VisualBasicSettingsConverter.cs
- LayoutEditorPart.cs
- SQLByteStorage.cs
- EmptyControlCollection.cs
- GeneralTransform3DGroup.cs
- FlowLayoutPanelDesigner.cs
- OuterGlowBitmapEffect.cs
- RequestContextBase.cs
- ReferencedAssembly.cs
- MemberHolder.cs
- PenThreadWorker.cs
- ProviderCollection.cs
- StructuralType.cs
- MaterialCollection.cs
- ByteStreamGeometryContext.cs
- WebPartVerbsEventArgs.cs
- TableRowCollection.cs
- TextRangeEditTables.cs
- XmlWellformedWriter.cs
- XPathSingletonIterator.cs
- XmlText.cs
- DropTarget.cs
- SmtpTransport.cs
- OleStrCAMarshaler.cs
- TraceHwndHost.cs
- Part.cs
- NonClientArea.cs
- WebPartTransformer.cs
- TextEmbeddedObject.cs
- BitmapEffectState.cs
- ReadOnlyTernaryTree.cs
- TraceLog.cs
- DocumentGridContextMenu.cs
- CustomLineCap.cs
- SelfIssuedAuthRSACryptoProvider.cs
- SqlDataSource.cs
- XmlLangPropertyAttribute.cs
- Vector3DCollectionConverter.cs