System.Reflection.MethodBase.GetMethodBody Method

When overridden in a derived class, gets a System.Reflection.MethodBody object that provides access to the MSIL stream, local variables, and exceptions for the current method.

Syntax

public virtual MethodBody GetMethodBody ()

Returns

A System.Reflection.MethodBody object that provides access to the MSIL stream, local variables, and exceptions for the current method.

Remarks

You do not have to override the MethodBase.GetMethodBody in order to use it. You can call the MethodBase.GetMethodBody method on System.Reflection.MethodInfo and System.Reflection.ConstructorInfo objects, because the method is overridden in the runtime versions of these classes. For example, the runtime version of the System.Reflection.MethodInfo class derives from the System.Reflection.MethodInfo class, which in turn derives from the System.Reflection.MethodBase class.

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0