Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / clr / src / BCL / System / InsufficientMemoryException.cs / 1 / 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
- ScopedKnownTypes.cs
- CompilationRelaxations.cs
- ModelItemCollection.cs
- ToolStripItemCollection.cs
- StylusPointPropertyUnit.cs
- MediaContextNotificationWindow.cs
- PostBackTrigger.cs
- SystemThemeKey.cs
- ProgramPublisher.cs
- Rijndael.cs
- OdbcFactory.cs
- KeyInfo.cs
- DecimalConstantAttribute.cs
- XPathEmptyIterator.cs
- ValuePattern.cs
- XmlTextReaderImpl.cs
- SqlBuffer.cs
- TextFindEngine.cs
- FactoryGenerator.cs
- DefaultTraceListener.cs
- Preprocessor.cs
- AttachInfo.cs
- WpfGeneratedKnownProperties.cs
- Soap.cs
- HttpFileCollection.cs
- TeredoHelper.cs
- Vector3DConverter.cs
- HwndHostAutomationPeer.cs
- RuntimeConfigLKG.cs
- ModuleConfigurationInfo.cs
- TextRange.cs
- Int16Converter.cs
- DbException.cs
- IndexedEnumerable.cs
- Viewport2DVisual3D.cs
- AppSettings.cs
- BindingBase.cs
- AttributeUsageAttribute.cs
- SafeRightsManagementPubHandle.cs
- SoapReflectionImporter.cs
- NamespaceCollection.cs
- XmlHierarchyData.cs
- Emitter.cs
- Glyph.cs
- ConstructorNeedsTagAttribute.cs
- DependencyObjectPropertyDescriptor.cs
- DrawItemEvent.cs
- UriScheme.cs
- SerialPinChanges.cs
- CodeSubDirectoriesCollection.cs
- DesignerTransaction.cs
- ConnectionStringSettingsCollection.cs
- CodeParameterDeclarationExpressionCollection.cs
- InvalidProgramException.cs
- FixedSOMGroup.cs
- ContentHostHelper.cs
- WindowsRichEditRange.cs
- XmlAggregates.cs
- Model3DCollection.cs
- MethodToken.cs
- ApplicationDirectory.cs
- PersonalizablePropertyEntry.cs
- SafeHGlobalHandleCritical.cs
- FileDialogPermission.cs
- SqlBulkCopyColumnMapping.cs
- ParenthesizePropertyNameAttribute.cs
- MessageQueueEnumerator.cs
- Pen.cs
- PartialToken.cs
- ExpressionHelper.cs
- ParallelLoopState.cs
- MethodBuilder.cs
- SubclassTypeValidatorAttribute.cs
- WebBrowserDocumentCompletedEventHandler.cs
- SchemaImporterExtension.cs
- FilterQuery.cs
- WinEventWrap.cs
- SystemGatewayIPAddressInformation.cs
- WinEventWrap.cs
- TabItem.cs
- UserMapPath.cs
- ContextMenu.cs
- UInt32.cs
- PeerEndPoint.cs
- XPathParser.cs
- XmlSchemaElement.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- BuildManagerHost.cs
- SmtpTransport.cs
- LayoutEditorPart.cs
- DbMetaDataFactory.cs
- DataRowExtensions.cs
- HitTestFilterBehavior.cs
- SqlAliaser.cs
- XslNumber.cs
- SafeNativeMethods.cs
- RefreshPropertiesAttribute.cs
- GridViewDeletedEventArgs.cs
- ConfigurationSchemaErrors.cs
- WindowsSecurityToken.cs