This documentation is archived and is not being maintained.

TargetException Constructor

.NET Framework 1.1

Initializes a new instance of the TargetException class.

Overload List

Initializes a new instance of the TargetException class with an empty message and the root cause of the exception.

[Visual Basic] Public Sub New()
[C#] public TargetException();
[C++] public: TargetException();
[JScript] public function TargetException();

Initializes a new instance of the TargetException class with the given message and the root cause exception.

[Visual Basic] Public Sub New(String)
[C#] public TargetException(string);
[C++] public: TargetException(String*);
[JScript] public function TargetException(String);

Initializes a new instance of the TargetException class with the specified serialization and context information.

[Visual Basic] Protected Sub New(SerializationInfo, StreamingContext)
[C#] protected TargetException(SerializationInfo, StreamingContext);
[C++] protected: TargetException(SerializationInfo*, StreamingContext);
[JScript] protected function TargetException(SerializationInfo, StreamingContext);

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

[Visual Basic] Public Sub New(String, Exception)
[C#] public TargetException(string, Exception);
[C++] public: TargetException(String*, Exception*);
[JScript] public function TargetException(String, Exception);

See Also

TargetException Class | TargetException Members | System.Reflection Namespace

Show: