Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DynamicILInfo.GetTokenFor Method (DynamicMethod)

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

Namespace:  System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

public int GetTokenFor(
	DynamicMethod method


Type: System.Reflection.Emit.DynamicMethod

The dynamic method to call.

Return Value

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

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
© 2015 Microsoft