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
- DataGridRowHeader.cs
- PathSegment.cs
- DataSetViewSchema.cs
- NamespaceInfo.cs
- Int32Collection.cs
- OleDbDataAdapter.cs
- Freezable.cs
- ValueChangedEventManager.cs
- Ipv6Element.cs
- FormsAuthentication.cs
- HebrewCalendar.cs
- DocumentGrid.cs
- Point.cs
- OpenTypeLayoutCache.cs
- ClientEventManager.cs
- Ops.cs
- DynamicObject.cs
- PathParser.cs
- WindowsTokenRoleProvider.cs
- ArrayWithOffset.cs
- DriveInfo.cs
- XamlParser.cs
- MaskInputRejectedEventArgs.cs
- SessionStateUtil.cs
- SetUserLanguageRequest.cs
- ScrollContentPresenter.cs
- ThumbButtonInfoCollection.cs
- SignatureHelper.cs
- FileSystemWatcher.cs
- SqlDataReader.cs
- StringHandle.cs
- FilteredDataSetHelper.cs
- HashHelper.cs
- LinqDataSourceView.cs
- TextFormatterContext.cs
- SmiEventSink.cs
- CodeNamespaceCollection.cs
- ModelFunctionTypeElement.cs
- EmptyCollection.cs
- QilReplaceVisitor.cs
- ToolStripContentPanel.cs
- IList.cs
- ZoneIdentityPermission.cs
- PartialList.cs
- CompositeCollectionView.cs
- XmlBoundElement.cs
- PixelFormat.cs
- CaretElement.cs
- MarshalByValueComponent.cs
- CodeSubDirectoriesCollection.cs
- SafeReversePInvokeHandle.cs
- FixedSOMFixedBlock.cs
- OutputCache.cs
- Transactions.cs
- ActivityBuilderXamlWriter.cs
- EntityKeyElement.cs
- EntityException.cs
- RenamedEventArgs.cs
- FilterRepeater.cs
- AuthenticationSection.cs
- ParameterSubsegment.cs
- FilterElement.cs
- ItemsPresenter.cs
- InProcStateClientManager.cs
- ConnectivityStatus.cs
- UnsafeNativeMethods.cs
- ListBindingConverter.cs
- StringFormat.cs
- StateMachineWorkflowInstance.cs
- DocumentPage.cs
- RewritingValidator.cs
- DelayedRegex.cs
- Automation.cs
- ConfigurationElementProperty.cs
- UMPAttributes.cs
- UriTemplateVariablePathSegment.cs
- DrawListViewSubItemEventArgs.cs
- DrawingGroupDrawingContext.cs
- System.Data_BID.cs
- BooleanToVisibilityConverter.cs
- FontStyles.cs
- CreatingCookieEventArgs.cs
- HebrewNumber.cs
- SoapMessage.cs
- ArrayElementGridEntry.cs
- TwoPhaseCommit.cs
- FormatConvertedBitmap.cs
- XmlSchemaDatatype.cs
- TabControlEvent.cs
- TreeViewImageIndexConverter.cs
- ConnectionStringSettings.cs
- TableLayoutPanelCellPosition.cs
- PropertyTabAttribute.cs
- BevelBitmapEffect.cs
- ImmutableAssemblyCacheEntry.cs
- EmbossBitmapEffect.cs
- Literal.cs
- TrustLevel.cs
- QilLiteral.cs
- DataGridRow.cs