Gets a token, valid in the scope of the current System.Reflection.Emit.DynamicILInfo, representing a method to be accessed from the associated dynamic method.
A token that can be used as the operand of an MSIL instruction that accesses methods, such as OpCodes.Call or OpCodes.Ldtoken, in the scope of the current System.Reflection.Emit.DynamicILInfo object.
You must obtain a token for any method that will be accessed by the dynamic method associated with the current System.Reflection.Emit.DynamicILInfo object. Use the erload:System.Type.GetMethod method to get a System.Reflection.MethodInfo for the method you want to access, and then use the System.Reflection.MethodBase.MethodHandle property to get the RuntimeMethodHandle.
For a method that belongs to a generic type, use the DynamicILInfo.GetTokenFor(RuntimeMethodHandle, RuntimeTypeHandle) method overload and specify a RuntimeTypeHandle for the generic type.