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
- ArglessEventHandlerProxy.cs
- UIInitializationException.cs
- DropShadowBitmapEffect.cs
- WindowsListViewScroll.cs
- RpcResponse.cs
- securitycriticaldataformultiplegetandset.cs
- LayoutEvent.cs
- CutCopyPasteHelper.cs
- XPathSingletonIterator.cs
- X509KeyIdentifierClauseType.cs
- SmiEventSink_Default.cs
- ToolStripPanelRenderEventArgs.cs
- CodeComment.cs
- SafeLocalAllocation.cs
- CacheEntry.cs
- Viewport3DVisual.cs
- HostExecutionContextManager.cs
- NameSpaceEvent.cs
- AsymmetricKeyExchangeFormatter.cs
- UnitySerializationHolder.cs
- WorkflowApplicationAbortedEventArgs.cs
- EditorPartCollection.cs
- ExceptionRoutedEventArgs.cs
- ToolStripRendererSwitcher.cs
- ContentElementAutomationPeer.cs
- QueryExpr.cs
- BamlTreeMap.cs
- ResourceIDHelper.cs
- JournalNavigationScope.cs
- ClientTargetSection.cs
- UniqueConstraint.cs
- DateTimeOffsetAdapter.cs
- MenuItemCollection.cs
- FormatException.cs
- FileVersionInfo.cs
- NameValuePermission.cs
- VerificationAttribute.cs
- CompositionAdorner.cs
- ConfigurationProviderException.cs
- AuthenticationServiceManager.cs
- XmlException.cs
- DispatcherHookEventArgs.cs
- PersonalizationStateQuery.cs
- GiveFeedbackEventArgs.cs
- EmptyStringExpandableObjectConverter.cs
- BitmapCacheBrush.cs
- ManagedFilter.cs
- CodeMethodInvokeExpression.cs
- XDRSchema.cs
- SmiRequestExecutor.cs
- ControlEvent.cs
- GridLength.cs
- ObfuscationAttribute.cs
- CachedTypeface.cs
- XmlDigitalSignatureProcessor.cs
- Workspace.cs
- FileAuthorizationModule.cs
- WindowsListViewGroupHelper.cs
- Attribute.cs
- EasingKeyFrames.cs
- MdImport.cs
- CodeExporter.cs
- XmlAttributeProperties.cs
- WebPartAuthorizationEventArgs.cs
- Rijndael.cs
- PolicyManager.cs
- StrongNamePublicKeyBlob.cs
- SharedHttpTransportManager.cs
- AutomationAttributeInfo.cs
- DesignerVerb.cs
- ScrollBar.cs
- WebPartEditVerb.cs
- InvalidEnumArgumentException.cs
- GridViewCancelEditEventArgs.cs
- XmlNode.cs
- Membership.cs
- RecordBuilder.cs
- OutputWindow.cs
- TdsParserStaticMethods.cs
- AnimationClock.cs
- ManifestSignatureInformation.cs
- DataGridViewCellFormattingEventArgs.cs
- SqlIdentifier.cs
- RectangleF.cs
- ResourceDescriptionAttribute.cs
- SafeRightsManagementPubHandle.cs
- Package.cs
- ViewBox.cs
- ReadOnlyObservableCollection.cs
- RegexGroupCollection.cs
- UnauthorizedAccessException.cs
- SqlCacheDependencyDatabase.cs
- CreateInstanceBinder.cs
- LayoutManager.cs
- RefreshEventArgs.cs
- SizeFConverter.cs
- SmtpFailedRecipientsException.cs
- SingleObjectCollection.cs
- ComponentCommands.cs
- ButtonField.cs