Export (0) Print
Expand All

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.

System.Object
   System.Exception
      System.ApplicationException
         System.Reflection.TargetException

[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

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.

Remarks

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.

Requirements

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

Show:
© 2014 Microsoft