Description

This constructor initializes the System.Reflection.TargetException.Message property of the new instance to a system-supplied message that describes the
error, such as "Instance method cannot be invoked on a null target."
This message takes into account the current system culture.

The System.Reflection.TargetException.InnerException property of the new instance is initialized to null
.

Parameters

message

A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

Description

This constructor initializes the System.Reflection.TargetException.Message property of the new instance using message. If message is
null
, the System.Reflection.TargetException.Message property is initialized to
the system-supplied message provided by the constructor that takes no
arguments.

The System.Reflection.TargetException.InnerException property is initialized to null
.

Parameters

message

A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

inner

An instance of Exception that is the cause of the current Exception. If inner is non-null, then the current Exception was raised in a catch block handling inner .

Description

This constructor initializes the System.Reflection.TargetException.Message property of the new instance using message, and
the System.Reflection.TargetException.InnerException property using inner. If message is null
,
the System.Reflection.TargetException.Message property is initialized to the
system-supplied message provided by the constructor that takes no
arguments.

[Note: For information on inner exceptions,
see System.Exception.InnerException.]