System.Reflection.TargetInvocationException Class

The exception that is thrown by methods invoked through reflection. This class cannot be inherited.

See Also: TargetInvocationException Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public sealed class TargetInvocationException : ApplicationException

Remarks

For more information, see MethodBase.Invoke(object, Object[]).

TargetInvocationException uses the HRESULT COR_E_TARGETINVOCATION which has the value 0x80131604.

When created, the TargetInvocationException is passed a reference to the exception thrown by the method invoked through reflection. The Exception.InnerException property holds the underlying exception.

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0