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
- UTF8Encoding.cs
- TextTrailingCharacterEllipsis.cs
- ObjectStateFormatter.cs
- TextParagraph.cs
- VectorConverter.cs
- CqlGenerator.cs
- FormViewPageEventArgs.cs
- Color.cs
- X509Chain.cs
- WsdlBuildProvider.cs
- CollectionViewSource.cs
- ImageListStreamer.cs
- BitArray.cs
- CellTreeSimplifier.cs
- ClientProxyGenerator.cs
- BufferedWebEventProvider.cs
- AVElementHelper.cs
- Listbox.cs
- CopyEncoder.cs
- EventProviderWriter.cs
- BindingMemberInfo.cs
- TypeDescriptorContext.cs
- HttpWebRequest.cs
- LabelInfo.cs
- XPathNavigatorReader.cs
- Region.cs
- TaskFileService.cs
- XmlSchemaComplexContentRestriction.cs
- DoWorkEventArgs.cs
- TemplateBuilder.cs
- ExpressionBuilder.cs
- SecurityKeyType.cs
- HijriCalendar.cs
- CodeRegionDirective.cs
- TreeIterator.cs
- HttpResponseInternalWrapper.cs
- EventBindingService.cs
- EpmSyndicationContentSerializer.cs
- AdornerPresentationContext.cs
- CodeSnippetCompileUnit.cs
- PriorityQueue.cs
- SimpleWorkerRequest.cs
- formatter.cs
- XmlObjectSerializer.cs
- HtmlInputButton.cs
- XXXOnTypeBuilderInstantiation.cs
- SrgsRuleRef.cs
- EditorResources.cs
- TypedDataSetSchemaImporterExtension.cs
- BindingContext.cs
- SubclassTypeValidator.cs
- MethodCallConverter.cs
- TableItemProviderWrapper.cs
- BasePattern.cs
- embossbitmapeffect.cs
- VisualCollection.cs
- ManifestResourceInfo.cs
- OleCmdHelper.cs
- XPathNavigatorKeyComparer.cs
- SvcMapFileSerializer.cs
- EmbeddedMailObject.cs
- ComPlusThreadInitializer.cs
- EntityDataSourceConfigureObjectContext.cs
- RegexCompilationInfo.cs
- SqlNodeAnnotation.cs
- SiteMapNode.cs
- XmlWriterDelegator.cs
- mediaclock.cs
- CultureTableRecord.cs
- FilteredXmlReader.cs
- ActiveXHelper.cs
- odbcmetadatafactory.cs
- DaylightTime.cs
- SplitterEvent.cs
- QueryCursorEventArgs.cs
- XmlCharType.cs
- rsa.cs
- VisualStateChangedEventArgs.cs
- InterleavedZipPartStream.cs
- DefaultSettingsSection.cs
- Triplet.cs
- Timer.cs
- XsltSettings.cs
- JpegBitmapDecoder.cs
- DefaultValueAttribute.cs
- MetricEntry.cs
- recordstatefactory.cs
- RequestTimeoutManager.cs
- ServiceBusyException.cs
- RtfFormatStack.cs
- ResourceDefaultValueAttribute.cs
- SqlDataSourceCache.cs
- ProgressBarAutomationPeer.cs
- WebPartUserCapability.cs
- COAUTHINFO.cs
- CapabilitiesUse.cs
- ErrorHandler.cs
- XmlNodeChangedEventArgs.cs
- MouseBinding.cs
- IndicShape.cs