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
- ExpressionList.cs
- SchemaImporterExtensionElementCollection.cs
- TreeNodeCollectionEditor.cs
- TextBoxBase.cs
- SafeThemeHandle.cs
- __ComObject.cs
- StackOverflowException.cs
- XamlReaderHelper.cs
- PointAnimationClockResource.cs
- GridViewDeletedEventArgs.cs
- FacetEnabledSchemaElement.cs
- EntityTypeBase.cs
- Marshal.cs
- TextEditorLists.cs
- FixedTextSelectionProcessor.cs
- DateTimeOffsetAdapter.cs
- RecognizedAudio.cs
- IsolationInterop.cs
- DESCryptoServiceProvider.cs
- IntSecurity.cs
- DataSetMappper.cs
- ComponentDispatcher.cs
- TemplateNameScope.cs
- SmtpSection.cs
- ResourceLoader.cs
- SqlInfoMessageEvent.cs
- ReaderWriterLock.cs
- SelectedGridItemChangedEvent.cs
- HiddenFieldPageStatePersister.cs
- VisualBasicExpressionConverter.cs
- RegistrationContext.cs
- ClientType.cs
- URLAttribute.cs
- CompilerGlobalScopeAttribute.cs
- SecurityDescriptor.cs
- ByteAnimationUsingKeyFrames.cs
- ConsoleKeyInfo.cs
- DataServiceQueryProvider.cs
- PrivateFontCollection.cs
- MyContact.cs
- DragDropManager.cs
- AnnotationHelper.cs
- CompiledELinqQueryState.cs
- CompilerParameters.cs
- URL.cs
- IRCollection.cs
- NavigationProperty.cs
- ParameterDataSourceExpression.cs
- NativeWindow.cs
- RegexWriter.cs
- ModuleElement.cs
- BrowserInteropHelper.cs
- DetailsView.cs
- FixedBufferAttribute.cs
- CodeTypeReferenceCollection.cs
- MultipleViewProviderWrapper.cs
- NativeCppClassAttribute.cs
- SapiRecognizer.cs
- ScrollChrome.cs
- ButtonPopupAdapter.cs
- TextCollapsingProperties.cs
- DescendantOverDescendantQuery.cs
- StringReader.cs
- UnaryNode.cs
- CodeNamespaceImportCollection.cs
- SqlDataSourceCache.cs
- PassportIdentity.cs
- TableStyle.cs
- NativeMethodsCLR.cs
- ToolStripContentPanel.cs
- FontInfo.cs
- HtmlInputPassword.cs
- TypeValidationEventArgs.cs
- FileEnumerator.cs
- FormatterConverter.cs
- ColorIndependentAnimationStorage.cs
- UInt64Storage.cs
- precedingquery.cs
- ContentControl.cs
- CustomAttributeBuilder.cs
- FixedTextBuilder.cs
- ValidatorCompatibilityHelper.cs
- odbcmetadatacollectionnames.cs
- CookieProtection.cs
- PropertyRecord.cs
- RequestQueue.cs
- CustomErrorsSectionWrapper.cs
- SemanticValue.cs
- mediaeventshelper.cs
- ContentElement.cs
- EventLogPermission.cs
- SoapInteropTypes.cs
- WindowsListViewGroupSubsetLink.cs
- TreeNode.cs
- PropertyInfoSet.cs
- EditBehavior.cs
- QilDataSource.cs
- HttpHeaderCollection.cs
- WebScriptMetadataMessageEncoderFactory.cs
- CodeNamespace.cs