System Namespace Exception Class
Returns the method that throws the current exception.
[ VB ]
<Serializable>
<ClassInterface ( ClassInterfaceType.AutoDual ) >
Public ReadOnly Property TargetSite As MethodBase
[ C# ]
[ Serializable ]
[ ClassInterface ( ClassInterfaceType.AutoDual ) ]
public MethodBase TargetSite {get;}
[ C++ ]
[ Serializable ]
[ ClassInterface ( ClassInterfaceType.AutoDual ) ]
public: __property MethodBase* get_TargetSite ( );
[ JScript ]
public Serializable
ClassInterface ( ClassInterfaceType.AutoDual )
function get TargetSite ( ) : MethodBase;
The MethodBase that threw the current exception.
If the method that throws this exception is not available and the stack trace is not a null reference ( Nothing in Visual Basic ), TargetSite obtains the method from the stack trace. If the stack trace is a null reference, TargetSite also returns a null reference.
Exception Members