ModuleBuilder.GetMethodToken Method (MethodInfo, IEnumerable<Type>)

.NET Framework (current version)
 

Returns the token used to identify the method that has the specified attributes and parameter types within this module.

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

public MethodToken GetMethodToken(
	MethodInfo method,
	IEnumerable<Type> optionalParameterTypes
)

Parameters

method
Type: System.Reflection.MethodInfo

The method to get a token for.

optionalParameterTypes
Type: System.Collections.Generic.IEnumerable<Type>

A collection of the types of the optional parameters to the method.

Return Value

Type: System.Reflection.Emit.MethodToken

The token used to identify the specified method within this module.

Exception Condition
ArgumentNullException

method is null.

InvalidOperationException

The declaring type for the method is not in this module.

.NET Framework
Available since 4.5
Return to top
Show: