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
- regiisutil.cs
- Cell.cs
- TableLayoutSettings.cs
- TreeNodeStyleCollection.cs
- DbProviderFactoriesConfigurationHandler.cs
- CalculatedColumn.cs
- Transform3DCollection.cs
- TreeViewItemAutomationPeer.cs
- XmlIlGenerator.cs
- PageHandlerFactory.cs
- ExeContext.cs
- TreeNodeCollection.cs
- ProviderSettings.cs
- SchemaObjectWriter.cs
- BitmapMetadata.cs
- EmitterCache.cs
- TreeViewImageIndexConverter.cs
- UnmanagedMemoryAccessor.cs
- ToolStripPanelSelectionBehavior.cs
- Size3DConverter.cs
- SystemNetworkInterface.cs
- LookupNode.cs
- x509utils.cs
- File.cs
- DbFunctionCommandTree.cs
- SplayTreeNode.cs
- UserControlBuildProvider.cs
- ManagedIStream.cs
- FieldNameLookup.cs
- AvTrace.cs
- ParameterCollection.cs
- SspiNegotiationTokenProviderState.cs
- FixedPageStructure.cs
- HighContrastHelper.cs
- StylusTip.cs
- SoapInteropTypes.cs
- XmlBaseReader.cs
- ChannelSinkStacks.cs
- GradientStop.cs
- Decorator.cs
- PolygonHotSpot.cs
- LogicalExpr.cs
- DrawItemEvent.cs
- CancellationScope.cs
- PersistChildrenAttribute.cs
- DescriptionAttribute.cs
- Image.cs
- LineSegment.cs
- VirtualizedCellInfoCollection.cs
- StorageComplexTypeMapping.cs
- WebBrowserContainer.cs
- Marshal.cs
- OracleDataAdapter.cs
- XmlTextReaderImpl.cs
- SqlMethods.cs
- TextServicesCompartment.cs
- UnknownWrapper.cs
- FormView.cs
- HashAlgorithm.cs
- RoutingTable.cs
- BuildProvider.cs
- ReflectionTypeLoadException.cs
- SpanIndex.cs
- TextEffectResolver.cs
- DispatcherTimer.cs
- TextServicesPropertyRanges.cs
- SchemaManager.cs
- XMLUtil.cs
- DetailsView.cs
- ProfileGroupSettingsCollection.cs
- NodeLabelEditEvent.cs
- WebPartTransformer.cs
- NameValuePair.cs
- CryptoApi.cs
- SelectionEditingBehavior.cs
- ImageUrlEditor.cs
- IncrementalHitTester.cs
- Application.cs
- X509SecurityToken.cs
- HostedNamedPipeTransportManager.cs
- ComponentChangingEvent.cs
- DataGridViewCellStyleChangedEventArgs.cs
- LineBreakRecord.cs
- DataRelationPropertyDescriptor.cs
- XmlSerializableServices.cs
- DiscoveryEndpointValidator.cs
- DescendantOverDescendantQuery.cs
- TableCell.cs
- TypefaceCollection.cs
- DataGridViewImageCell.cs
- TemplatedWizardStep.cs
- MessageQueuePermission.cs
- ScriptIgnoreAttribute.cs
- CapabilitiesPattern.cs
- MULTI_QI.cs
- FormClosingEvent.cs
- AsyncResult.cs
- Attributes.cs
- XmlBaseWriter.cs
- EpmAttributeNameBuilder.cs