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
- CompatibleIComparer.cs
- _NetRes.cs
- Encoder.cs
- ToolStripOverflow.cs
- ToolboxDataAttribute.cs
- BitmapEffectDrawingContextWalker.cs
- ColumnCollection.cs
- WeakReferenceList.cs
- GenericFlowSwitchHelper.cs
- Compiler.cs
- DBConcurrencyException.cs
- DataServiceRequestArgs.cs
- ControlCachePolicy.cs
- NamespaceCollection.cs
- SdlChannelSink.cs
- StorageFunctionMapping.cs
- _BaseOverlappedAsyncResult.cs
- FormViewDeleteEventArgs.cs
- ErrorProvider.cs
- CodeDirectiveCollection.cs
- DataSourceView.cs
- XmlDocumentSchema.cs
- LinkLabelLinkClickedEvent.cs
- Vector3DAnimation.cs
- RecordManager.cs
- DynamicMethod.cs
- ZipIORawDataFileBlock.cs
- KoreanCalendar.cs
- Journaling.cs
- GridItemProviderWrapper.cs
- ConvertEvent.cs
- Faults.cs
- XPathPatternBuilder.cs
- DateTimeFormat.cs
- DiscoveryClientChannelBase.cs
- RunInstallerAttribute.cs
- DataServiceProcessingPipeline.cs
- ServiceConfigurationTraceRecord.cs
- DesignBindingEditor.cs
- XmlLinkedNode.cs
- WorkItem.cs
- ViewStateModeByIdAttribute.cs
- GroupItemAutomationPeer.cs
- FrameworkContentElement.cs
- ModelProperty.cs
- SourceFilter.cs
- RoleManagerModule.cs
- BufferBuilder.cs
- ImageMapEventArgs.cs
- Line.cs
- LowerCaseStringConverter.cs
- FullTextBreakpoint.cs
- WebPartCatalogCloseVerb.cs
- SymbolType.cs
- CodeRemoveEventStatement.cs
- SamlConstants.cs
- OrthographicCamera.cs
- DesignerDataTable.cs
- SystemKeyConverter.cs
- Formatter.cs
- TextSerializer.cs
- ListManagerBindingsCollection.cs
- ToolZone.cs
- PropertyGridEditorPart.cs
- PenCursorManager.cs
- RtfControlWordInfo.cs
- SerializerWriterEventHandlers.cs
- WorkflowControlEndpoint.cs
- SafeEventLogWriteHandle.cs
- UserControl.cs
- NameValuePair.cs
- FirstMatchCodeGroup.cs
- FixedStringLookup.cs
- CodeEntryPointMethod.cs
- XmlMemberMapping.cs
- TextTreeTextElementNode.cs
- backend.cs
- MethodAccessException.cs
- PageDeviceFont.cs
- ResourceIDHelper.cs
- WsrmFault.cs
- _AutoWebProxyScriptHelper.cs
- MembershipValidatePasswordEventArgs.cs
- XmlDataSourceView.cs
- RelatedPropertyManager.cs
- CompressedStack.cs
- ExecutionTracker.cs
- EndpointConfigContainer.cs
- DataGridPagerStyle.cs
- TrackingQuery.cs
- DropAnimation.xaml.cs
- RuntimeHelpers.cs
- WebPartConnectionsDisconnectVerb.cs
- ToolStripRendererSwitcher.cs
- CmsUtils.cs
- CssClassPropertyAttribute.cs
- SoapIncludeAttribute.cs
- DataObjectEventArgs.cs
- HtmlInputReset.cs
- SmtpFailedRecipientsException.cs