SystemException Class

Definition

Serves as the base class for system exceptions namespace.

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

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

SystemException()

Initializes a new instance of the SystemException class.

SystemException(String)

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

SystemException(SerializationInfo, StreamingContext)

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

SystemException(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.

Methods

Data Inherited from Exception
GetBaseException() Inherited from Exception
GetObjectData(SerializationInfo, StreamingContext) Inherited from Exception
GetType() Inherited from Exception
HelpLink Inherited from Exception
HResult Inherited from Exception
InnerException Inherited from Exception
Message Inherited from Exception
SerializeObjectState Inherited from Exception
Source Inherited from Exception
StackTrace Inherited from Exception
TargetSite Inherited from Exception
ToString() Inherited from Exception
Equals(Object) Inherited from Object
Equals(Object, Object) Inherited from Object
GetHashCode() Inherited from Object
MemberwiseClone() Inherited from Object
ReferenceEquals(Object, Object) Inherited from Object

Applies to

See Also