Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- WebPartTransformer.cs
- UIElementAutomationPeer.cs
- XPathDocumentNavigator.cs
- cache.cs
- DbSource.cs
- ReliableOutputSessionChannel.cs
- LinearGradientBrush.cs
- BoolLiteral.cs
- BinarySecretKeyIdentifierClause.cs
- TextRangeAdaptor.cs
- Effect.cs
- FixedSOMPage.cs
- SrgsToken.cs
- ClientScriptManager.cs
- TypeHelpers.cs
- CheckableControlBaseAdapter.cs
- WebReferencesBuildProvider.cs
- NumericUpDown.cs
- DataGridViewImageColumn.cs
- BufferModeSettings.cs
- ResourceIDHelper.cs
- DataServiceQuery.cs
- WebContext.cs
- LayoutTableCell.cs
- FileSystemWatcher.cs
- XmlRawWriter.cs
- DynamicScriptObject.cs
- WindowsStreamSecurityUpgradeProvider.cs
- PasswordTextNavigator.cs
- HostingEnvironmentSection.cs
- TextDecorations.cs
- SourceFileBuildProvider.cs
- ListViewItemEventArgs.cs
- followingquery.cs
- Util.cs
- PerformanceCounterPermissionAttribute.cs
- ThaiBuddhistCalendar.cs
- FormViewUpdateEventArgs.cs
- TimestampInformation.cs
- OpCellTreeNode.cs
- FixedSchema.cs
- GenericXmlSecurityTokenAuthenticator.cs
- XamlTreeBuilderBamlRecordWriter.cs
- EnterpriseServicesHelper.cs
- DynamicPropertyReader.cs
- ResourceProviderFactory.cs
- BamlMapTable.cs
- CodeThrowExceptionStatement.cs
- ListBoxItemWrapperAutomationPeer.cs
- ComNativeDescriptor.cs
- WSHttpBinding.cs
- ItemsControl.cs
- ItemChangedEventArgs.cs
- Perspective.cs
- ListView.cs
- HttpModuleActionCollection.cs
- WaitHandle.cs
- Query.cs
- HttpTransportElement.cs
- UICuesEvent.cs
- ReadingWritingEntityEventArgs.cs
- WebPartMinimizeVerb.cs
- PointAnimationBase.cs
- SignatureResourcePool.cs
- RangeContentEnumerator.cs
- SectionRecord.cs
- StrokeNodeOperations2.cs
- CodeComment.cs
- AssemblyLoader.cs
- AppearanceEditorPart.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- BindableTemplateBuilder.cs
- ProfilePropertyMetadata.cs
- TextSelection.cs
- infer.cs
- DragDrop.cs
- DataException.cs
- SiteIdentityPermission.cs
- Validator.cs
- ContextProperty.cs
- RelationshipSet.cs
- FrameworkTextComposition.cs
- AnimationStorage.cs
- Point.cs
- DataViewSetting.cs
- TimeoutValidationAttribute.cs
- BooleanConverter.cs
- ADRoleFactory.cs
- ProfileSection.cs
- Item.cs
- XsdDataContractImporter.cs
- PropertyState.cs
- XmlWriter.cs
- DesignerLabelAdapter.cs
- DataKey.cs
- HelloMessageCD1.cs
- EnumValAlphaComparer.cs
- ETagAttribute.cs
- XmlNamespaceMapping.cs
- StreamGeometry.cs