TargetSite Property

_Exception.TargetSite Property


Provides COM objects with version-independent access to the Exception.TargetSite property.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

MethodBase TargetSite { get; }

Property Value

Type: System.Reflection.MethodBase

The MethodBase object that threw the current exception.

This method is for access to managed classes from unmanaged code and should not be called from managed code.

The Exception.TargetSite property gets the method that throws the current exception.

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft