TargetException Class
Collapse the table of content
Expand the table of content

TargetException Class

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]
Public Class TargetException
   Inherits ApplicationException
public class TargetException : ApplicationException
public __gc class TargetException : public ApplicationException
class TargetException extends ApplicationException

Thread Safety

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.


Namespace: System.Reflection

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)

See Also

TargetException Members | System.Reflection Namespace | Exception | Handling and Throwing Exceptions

© 2015 Microsoft