Code:
/ FX-1434 / FX-1434 / 1.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
- TabControl.cs
- CompiledAction.cs
- XPathChildIterator.cs
- ThemeInfoAttribute.cs
- BindStream.cs
- DataGridParentRows.cs
- BuilderElements.cs
- TokenBasedSet.cs
- HtmlShim.cs
- MouseBinding.cs
- DesignerToolStripControlHost.cs
- WebPartManagerInternals.cs
- XmlQueryContext.cs
- UInt32Converter.cs
- AdornerLayer.cs
- Token.cs
- PersistenceTypeAttribute.cs
- VisualTreeFlattener.cs
- Border.cs
- SmiRecordBuffer.cs
- GreaterThan.cs
- XPathMultyIterator.cs
- RadioButtonPopupAdapter.cs
- UpdateCompiler.cs
- InstanceNotReadyException.cs
- TextMessageEncodingElement.cs
- BindingExpressionUncommonField.cs
- SystemGatewayIPAddressInformation.cs
- EventBuilder.cs
- MemberProjectedSlot.cs
- StaticDataManager.cs
- DoubleStorage.cs
- QuaternionAnimation.cs
- OdbcTransaction.cs
- MediaScriptCommandRoutedEventArgs.cs
- PropertyInfo.cs
- ManualResetEvent.cs
- TranslateTransform3D.cs
- EndCreateSecurityTokenRequest.cs
- SystemUdpStatistics.cs
- ThreadExceptionDialog.cs
- X509ThumbprintKeyIdentifierClause.cs
- MarshalByRefObject.cs
- PropertyChange.cs
- CollectionBase.cs
- DataGridViewSelectedCellCollection.cs
- OrderedDictionaryStateHelper.cs
- ValidatorCollection.cs
- DirectoryNotFoundException.cs
- ChildTable.cs
- RSAProtectedConfigurationProvider.cs
- XmlWriter.cs
- NullableBoolConverter.cs
- MachinePropertyVariants.cs
- HttpListenerRequest.cs
- TableCellAutomationPeer.cs
- Point3D.cs
- ExpandedWrapper.cs
- Profiler.cs
- GenerateTemporaryTargetAssembly.cs
- MissingManifestResourceException.cs
- CssStyleCollection.cs
- HttpProxyTransportBindingElement.cs
- HtmlInputPassword.cs
- NetworkCredential.cs
- QueryStringParameter.cs
- RadioButtonRenderer.cs
- AutomationElement.cs
- TimeSpanSecondsConverter.cs
- ListInitExpression.cs
- TypeLoadException.cs
- ByteFacetDescriptionElement.cs
- figurelengthconverter.cs
- CodeGroup.cs
- QilChoice.cs
- GorillaCodec.cs
- TypeValidationEventArgs.cs
- TrackingQueryElement.cs
- Brushes.cs
- DefaultValueConverter.cs
- AuthenticateEventArgs.cs
- TcpPortSharing.cs
- InsufficientMemoryException.cs
- InternalDuplexBindingElement.cs
- ApplicationSecurityInfo.cs
- AccessibilityHelperForVista.cs
- SecurityPolicyVersion.cs
- ObjectDataSourceWizardForm.cs
- MessageQueuePermissionAttribute.cs
- TextBoxView.cs
- ConnectionManager.cs
- FactoryGenerator.cs
- RepeatBehavior.cs
- ZoneLinkButton.cs
- StyleBamlTreeBuilder.cs
- ApplicationSettingsBase.cs
- ObjectToModelValueConverter.cs
- PropertyValueChangedEvent.cs
- TextSchema.cs
- MetadataArtifactLoaderComposite.cs