System​Exception Class

Definition

Serves as the base class for system exceptions namespace.

[System.Runtime.InteropServices.ComVisible(true)]
public class SystemException : Exception
Inheritance
SystemException
Derived
Attributes

Inherited Members

System.Exception

System.Object

Remarks

This class is provided as a means to differentiate between system exceptions and application exceptions. It is the base class of such exceptions as ArgumentException, FormatException, and InvalidOperationException.

Important

Because SystemException serves as the base class of a variety of exception types, your code should not throw a SystemException exception, nor should it attempt to handle a SystemException exception unless you intend to re-throw the original exception.

SystemException uses the HRESULT COR_E_SYSTEM, that has the value 0x80131501.

Constructors

System​Exception()

Initializes a new instance of the SystemException class.

System​Exception(​String)

Initializes a new instance of the SystemException class with a specified error message.

System​Exception(​Serialization​Info, ​Streaming​Context)

Initializes a new instance of the SystemException class with serialized data.

System​Exception(​String, ​Exception)

Initializes a new instance of the SystemException class with a specified error message and a reference to the inner exception that is the cause of this exception.