Represents the exception that is thrown when an attempt is made to invoke an invalid target.
Object
Exception
ApplicationException
TargetException
[Visual Basic] Public Class TargetException Inherits ApplicationException [C#] public class TargetException : ApplicationException [C++] public __gc class TargetException : public ApplicationException [JScript] public class TargetException extends ApplicationException
The TargetException class is thrown when an attempt is made to invoke a non-static method on a null object. This may occur because the caller doesn't have access to the member or the target doesn't define the member, etc.
Namespace: System.Reflection
Assembly: mscorlib.dll