public class OutOfMemoryException : SystemException
Object
Exception
SystemException
OutOfMemoryException
mscorlib
BCL
Represents the error that occurs when insufficient memory prevents the current memory allocation from succeeding.
[Note: The following CIL instructions throw OutOfMemoryException:
]
- box
- newarr
- newobj
System Namespace
OutOfMemoryException Constructors
OutOfMemoryException() Constructor
OutOfMemoryException(System.String) Constructor
OutOfMemoryException(System.String, System.Exception) Constructor
public OutOfMemoryException();
Constructs and initializes a new instance of the OutOfMemoryException class.
This constructor initializes the System.OutOfMemoryException.Message property of the new instance to a system-supplied message that describes the error, such as "There was not enough memory to continue the execution of the program." This message takes into account the current system culture.The System.OutOfMemoryException.InnerException property is initialized to
null
.
System.OutOfMemoryException Class, System Namespace
public OutOfMemoryException(string message);
Constructs and initializes a new instance of the OutOfMemoryException class.
- message
- A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
This constructor initializes the System.OutOfMemoryException.Message property of the new instance using message. If message isnull
, the System.OutOfMemoryException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments. The System.OutOfMemoryException.InnerException property is initialized tonull
.
System.OutOfMemoryException Class, System Namespace
public OutOfMemoryException(string message, Exception innerException);
Constructs and initializes a new instance of the OutOfMemoryException class.
- message
- A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
- innerException
- An instance of Exception that is the cause of the current Exception. If innerException is non-null, then the current Exception was raised in a catch block handling innerException .
This constructor initializes the System.OutOfMemoryException.Message property of the new instance using message, and the System.OutOfMemoryException.InnerException property using innerException. If message isnull
, the System.OutOfMemoryException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.[Note: For information on inner exceptions, see System.Exception.InnerException .]
System.OutOfMemoryException Class, System Namespace