System.Exception Members

The members of System.Exception are listed below.

See Also: Inherited members from System.Object

Public Constructors

Initializes a new instance of the Exception class.

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

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

Protected Constructors

Public Properties

[read-only]
DataIDictionary.

Gets a collection of key/value pairs that provide additional user-defined information about the exception.

HelpLinkstring.

Gets or sets a link to the help file associated with this exception.

HResultint.

Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.

[read-only]
InnerExceptionException.

Gets the Exception instance that caused the current exception.

[read-only]
Messagestring.

Gets a message that describes the current exception.

Sourcestring.

Gets or sets the name of the application or the object that causes the error.

[read-only]
StackTracestring.

Gets a string representation of the immediate frames on the call stack.

[read-only]
TargetSiteSystem.Reflection.MethodBase.

Gets the method that throws the current exception.

Public Methods

GetBaseException() : Exception

When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.

GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)

When overridden in a derived class, sets the System.Runtime.Serialization.SerializationInfo with information about the exception.

GetType() : Type

Gets the runtime type of the current instance.

override
ToString() : string

Creates and returns a string representation of the current exception.

Protected Events

SerializeObjectState

Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception.