Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
TargetException Constructor (String)

TargetException Constructor (String)

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

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

public TargetException(
	string message
)

Parameters

message
Type: System.String

A String describing the reason why the exception occurred.

TargetException inherits from the Exception. This constructor sets the properties of the Exception object as shown in the following table.

Property

Value

InnerException

null

Message

The message string.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft