Export (0) Print
Expand All

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

.NET Framework 4.5

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.

ExceptionCondition
ArgumentNullException

method is null.

InvalidOperationException

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

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft