Represents the exception that is thrown when an attempt is made to invoke an invalid target.
For a list of all members of this type, see TargetException Members.
[Visual Basic] <Serializable> Public Class TargetException Inherits ApplicationException [C#] [Serializable] public class TargetException : ApplicationException [C++] [Serializable] public __gc class TargetException : public ApplicationException [JScript] public Serializable class TargetException extends ApplicationException
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
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.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: Mscorlib (in Mscorlib.dll)