System.Reflection.TargetException Class

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

See Also: TargetException Members


public class TargetException : ApplicationException


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 tp:// 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 Exception instead.

Thread Safety

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


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