Reflection mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.ApplicationException System.Runtime.InteropServices.ComVisible(true)

A TargetException is thrown when an attempt is made to invoke a non-static method on a null object. This may occur because the caller does not have access to the member, or because the target does not define the member, and so on.

This exception is not included in the .NET for Windows Store apps or the Portable Class Library, but it is thrown by some members that are. To catch the exception in that case, write a catch statement for instead.

Represents the exception that is thrown when an attempt is made to invoke an invalid target.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  The InnerException property is set to null and the HRESULT error code is set to COR_E_TARGET.

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

  Property

  Value

  null

  The empty string ("").

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

  0
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

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

  Property

  Value

  null

  The message string.

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

  A String describing the reason why the exception occurred.
  0
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  To be added.

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

  The data for serializing or deserializing the object.
  The source of and destination for the object.
- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the property. The property returns the same value that is passed into the constructor, or null if the property does not supply the inner exception value to the constructor.

  The following table shows the initial property values for an instance of .

  Property

  Value

  The inner exception reference.

  The error message string.

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

  The error message that explains the reason for the exception.
  The exception that is the cause of the current exception. If the parameter is not null, the current exception is raised in a catch block that handles the inner exception.
  0
0