Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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) {
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NonParentingControl.cs
- LicenseProviderAttribute.cs
- ServiceErrorHandler.cs
- IncrementalHitTester.cs
- TrustSection.cs
- GeneralTransformCollection.cs
- Attributes.cs
- HighlightComponent.cs
- LogManagementAsyncResult.cs
- XPathNavigator.cs
- ToolStripComboBox.cs
- XamlFilter.cs
- SqlCacheDependencySection.cs
- RepeatButton.cs
- GacUtil.cs
- EditorZone.cs
- MouseGestureValueSerializer.cs
- TextModifier.cs
- _UriTypeConverter.cs
- ButtonPopupAdapter.cs
- Int32EqualityComparer.cs
- WCFServiceClientProxyGenerator.cs
- DataGridViewRow.cs
- basecomparevalidator.cs
- BamlTreeMap.cs
- PathSegmentCollection.cs
- _NtlmClient.cs
- CompiledQuery.cs
- ControlType.cs
- SemanticTag.cs
- SchemaTypeEmitter.cs
- DbConnectionPoolIdentity.cs
- WebPartTransformer.cs
- TypeContext.cs
- QilVisitor.cs
- SystemColorTracker.cs
- SizeConverter.cs
- UITypeEditors.cs
- RSAPKCS1KeyExchangeFormatter.cs
- RuleAction.cs
- Brush.cs
- StatusBarItem.cs
- TableDetailsCollection.cs
- InputReferenceExpression.cs
- UpdatePanelTrigger.cs
- UnsafeNativeMethodsPenimc.cs
- SoapMessage.cs
- BypassElementCollection.cs
- StrokeFIndices.cs
- TypeUsageBuilder.cs
- PageClientProxyGenerator.cs
- CategoryValueConverter.cs
- DefaultParameterValueAttribute.cs
- SystemPens.cs
- RegistrationServices.cs
- ManagedFilter.cs
- NumberFunctions.cs
- GridView.cs
- BufferModeSettings.cs
- RuleProcessor.cs
- SecurityDescriptor.cs
- OutputCacheSection.cs
- SpellerInterop.cs
- MSHTMLHostUtil.cs
- FilteredReadOnlyMetadataCollection.cs
- ListViewItemMouseHoverEvent.cs
- BuildManagerHost.cs
- AlphaSortedEnumConverter.cs
- ActivityExecutionWorkItem.cs
- SafeCertificateStore.cs
- TempFiles.cs
- BinaryReader.cs
- EqualityArray.cs
- DataKey.cs
- CaseInsensitiveOrdinalStringComparer.cs
- JournalNavigationScope.cs
- HyperLinkStyle.cs
- SQLCharsStorage.cs
- FileLogRecordEnumerator.cs
- StreamSecurityUpgradeInitiatorBase.cs
- GatewayIPAddressInformationCollection.cs
- Section.cs
- UiaCoreApi.cs
- Soap11ServerProtocol.cs
- DataGridViewLinkColumn.cs
- ObjectDataProvider.cs
- ControlCachePolicy.cs
- FixedSOMTextRun.cs
- XmlWrappingWriter.cs
- ControlIdConverter.cs
- XmlDocumentSchema.cs
- DateBoldEvent.cs
- CancellationTokenRegistration.cs
- DocumentsTrace.cs
- HttpCookiesSection.cs
- MulticastDelegate.cs
- DataGridLengthConverter.cs
- UIElementHelper.cs
- CellLabel.cs
- PopupControlService.cs