Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- Themes.cs
- ResourceDescriptionAttribute.cs
- FrameworkTextComposition.cs
- Renderer.cs
- RotateTransform.cs
- Effect.cs
- InitializationEventAttribute.cs
- PasswordBoxAutomationPeer.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- DetailsViewRowCollection.cs
- ClientSettingsProvider.cs
- HyperLinkStyle.cs
- RequestQueue.cs
- WindowsSlider.cs
- CodeDomComponentSerializationService.cs
- SqlDataSourceCommandEventArgs.cs
- TextTreePropertyUndoUnit.cs
- ActivationServices.cs
- NumberSubstitution.cs
- InvalidCastException.cs
- TemplatePropertyEntry.cs
- PersistenceException.cs
- StringFreezingAttribute.cs
- X509ChainPolicy.cs
- DataGridViewHeaderCell.cs
- InputProcessorProfiles.cs
- FlowDecisionDesigner.xaml.cs
- StandardToolWindows.cs
- ExpressionBuilderContext.cs
- FlowDocumentScrollViewer.cs
- SecurityAlgorithmSuite.cs
- XmlIlTypeHelper.cs
- NamespaceEmitter.cs
- Executor.cs
- MethodToken.cs
- DataGridViewRowPrePaintEventArgs.cs
- ToolboxItemCollection.cs
- PresentationTraceSources.cs
- SynchronizingStream.cs
- HttpCachePolicyElement.cs
- FrameworkPropertyMetadata.cs
- DrawingAttributes.cs
- AccessText.cs
- GridViewUpdatedEventArgs.cs
- ObjectDataSourceFilteringEventArgs.cs
- MinimizableAttributeTypeConverter.cs
- ControlParameter.cs
- RegexTree.cs
- ScriptRef.cs
- SQLByteStorage.cs
- StrokeRenderer.cs
- XsdBuildProvider.cs
- CommonProperties.cs
- SqlClientWrapperSmiStreamChars.cs
- EditableTreeList.cs
- WebPartConnection.cs
- CollaborationHelperFunctions.cs
- Context.cs
- VersionedStreamOwner.cs
- Rect.cs
- CapabilitiesUse.cs
- JsonUriDataContract.cs
- ServiceOperationParameter.cs
- CopyAction.cs
- PropertyStore.cs
- AssemblyBuilder.cs
- BitmapMetadataBlob.cs
- SafeWaitHandle.cs
- ErrorProvider.cs
- XamlClipboardData.cs
- XmlSchemaValidator.cs
- DbModificationCommandTree.cs
- RuntimeIdentifierPropertyAttribute.cs
- TypeExtensionConverter.cs
- PropertyEmitter.cs
- AuthStoreRoleProvider.cs
- EastAsianLunisolarCalendar.cs
- CrossContextChannel.cs
- ComponentResourceManager.cs
- ViewBox.cs
- HttpUnhandledOperationInvoker.cs
- XmlDataSourceNodeDescriptor.cs
- DesignerTransactionCloseEvent.cs
- GlobalizationSection.cs
- DispatcherBuilder.cs
- DataObjectSettingDataEventArgs.cs
- SharedUtils.cs
- QilFactory.cs
- PnrpPermission.cs
- TypeLibConverter.cs
- SQLBytesStorage.cs
- StreamMarshaler.cs
- Barrier.cs
- SmiEventSink_Default.cs
- XmlSchemaSimpleTypeUnion.cs
- ValidationHelper.cs
- MarginCollapsingState.cs
- Nullable.cs
- SpnegoTokenAuthenticator.cs
- XpsResourceDictionary.cs