.NET Framework Class Library OutOfMemoryException Class The exception that is thrown when there is not enough memory to continue the execution of a program.

Inheritance Hierarchy
Namespace:
System
Assembly:
mscorlib (in mscorlib.dll)

Syntax
<SerializableAttribute> _
<ComVisibleAttribute(True)> _
Public Class OutOfMemoryException _
Inherits SystemException
[SerializableAttribute]
[ComVisibleAttribute(true)]
public class OutOfMemoryException : SystemException
[SerializableAttribute]
[ComVisibleAttribute(true)]
public ref class OutOfMemoryException : public SystemException
[<SerializableAttribute>]
[<ComVisibleAttribute(true)>]
type OutOfMemoryException =
class
inherit SystemException
end
The OutOfMemoryException type exposes the following members.

Constructors

Methods

Events
|
| Name | Description |
|---|
.gif) | SerializeObjectState | Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (Inherited from Exception.) | Top

Remarks
The following Microsoft intermediate (MSIL) instructions throw OutOfMemoryException :
OutOfMemoryException uses the HRESULT COR_E_OUTOFMEMORY, which has the value 0x8007000E. For a list of initial property values for an instance of OutOfMemoryException, see the OutOfMemoryException constructors. Note |
|---|
The value of the inherited Data property is always nullNothingnullptra null reference (Nothing in Visual Basic). |

Version Information
.NET FrameworkSupported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0 .NET Framework Client ProfileSupported in: 4, 3.5 SP1 Portable Class LibrarySupported in: Portable Class Library

Platforms
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Thread Safety
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also
|
Biblioteca de clases de .NET Framework OutOfMemoryException (Clase) Excepción que se produce cuando no hay suficiente memoria para continuar con la ejecución de un programa.

Jerarquía de herencia
Espacio de nombres:
System
Ensamblado:
mscorlib (en mscorlib.dll)

Sintaxis
<SerializableAttribute> _
<ComVisibleAttribute(True)> _
Public Class OutOfMemoryException _
Inherits SystemException
[SerializableAttribute]
[ComVisibleAttribute(true)]
public class OutOfMemoryException : SystemException
[SerializableAttribute]
[ComVisibleAttribute(true)]
public ref class OutOfMemoryException : public SystemException
[<SerializableAttribute>]
[<ComVisibleAttribute(true)>]
type OutOfMemoryException =
class
inherit SystemException
end
El tipo OutOfMemoryException expone los siguientes miembros.

Constructores

Métodos

Eventos
|
| Nombre | Descripción |
|---|
.gif) | SerializeObjectState | Se produce cuando se serializa una excepción para crear un objeto de estados de excepción que contiene datos serializados sobre la excepción. (Se hereda de Exception). | Arriba

Comentarios
Las siguientes instrucciones del Lenguaje intermedio de Microsoft (MSIL) producen OutOfMemoryException:
OutOfMemoryException utiliza HRESULT COR_E_OUTOFMEMORY, que tiene el valor 0x80007000E. Para obtener una lista con los valores iniciales de las propiedades de una instancia de OutOfMemoryException, vea los constructores OutOfMemoryException. Nota |
|---|
El valor de la propiedad heredad Data es siempre nullNothingnullptrreferencia null (Nothing en Visual Basic). |

Información de versión
.NET FrameworkCompatible con: 4, 3.5, 3.0, 2.0, 1.1, 1.0 .NET Framework Client ProfileCompatible con: 4, 3.5 SP1 Compatible con:

Plataformas
Windows 7, Windows Vista SP1 o posterior, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (no se admite Server Core), Windows Server 2008 R2 (se admite Server Core con SP1 o posterior), Windows Server 2003 SP2
.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.

Seguridad para subprocesos
Todos los miembros static ( Shared en Visual Basic) públicos de este tipo son seguros para la ejecución de subprocesos. No se garantiza que los miembros de instancias sean seguros para la ejecución de subprocesos.

Vea también
|