Returns the Assembly of the method that invoked the currently executing method.
Assembly: mscorlib (in mscorlib.dll)
If the method that calls the method is expanded inline by the just-in-time (JIT) compiler, or if its caller is expanded inline, the assembly that is returned by may differ unexpectedly. For example, consider the following methods and assemblies:
Method M1 in assembly A1 calls .
Method M2 in assembly A2 calls M1.
Method M3 in assembly A3 calls M2.
When M1 is not inlined, returns A2. When M1 is inlined, returns A3. Similarly, when M2 is not inlined, returns A2. When M2 is inlined, returns A3.
This effect also occurs when M1 executes as a tail call from M2, or when M2 executes as a tail call from M3. You can prevent the JIT compiler from inlining the method that calls , by applying the MethodImplAttribute attribute with the MethodImplOptions.NoInlining flag, but there is no similar mechanism for preventing tail calls.
Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.