The exception that is thrown when there is not enough memory to continue the execution of a program.
For a list of all members of this type, see OutOfMemoryException Members.
[Visual Basic] <Serializable> Public Class OutOfMemoryException Inherits SystemException [C#] [Serializable] public class OutOfMemoryException : SystemException [C++] [Serializable] public __gc class OutOfMemoryException : public SystemException [JScript] public Serializable class OutOfMemoryException extends SystemException
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
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.
.NET Compact Framework Platform Note: The common language runtime can throw the exception when memory is not adequate to allocate for internal purposes or new managed objects. To avoid the exception, avoid programming large methods that consume 64 or more kilobytes of memory.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
Assembly: Mscorlib (in Mscorlib.dll)