System.Reflection.Emit.DynamicILInfo.GetTokenFor Method

Gets a token, valid in the scope of the current System.Reflection.Emit.DynamicILInfo, representing a dynamic method to be called from the associated method.

Syntax

public int GetTokenFor (DynamicMethod method)

Parameters

method
The dynamic method to call.

Returns

A token that can be embedded in the MSIL stream for the associated dynamic method, as the target of an MSIL instruction.

Remarks

The token returned by this method overload allows you to call a dynamic method from the dynamic method associated with the current System.Reflection.Emit.DynamicILInfo object. To call the associated dynamic method recursively, pass the value of the DynamicILInfo.DynamicMethod property.

Requirements

Namespace: System.Reflection.Emit
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0