TargetException Class (System.Reflection) (original) (raw)

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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

public ref class TargetException : ApplicationException
public ref class TargetException : Exception
public class TargetException : ApplicationException
public class TargetException : Exception
[System.Serializable]
public class TargetException : ApplicationException
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class TargetException : ApplicationException
type TargetException = class
    inherit ApplicationException
type TargetException = class
    inherit Exception
[<System.Serializable>]
type TargetException = class
    inherit ApplicationException
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type TargetException = class
    inherit ApplicationException
Public Class TargetException
Inherits ApplicationException
Public Class TargetException
Inherits Exception

Inheritance

Inheritance

Attributes

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.

Applies to

See also