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
Available since 1.1
Return to top
Show: