ModuleBuilder.GetMethodToken 方法

定义

返回用于标识此模块内指定方法的标记。Returns the token used to identify the specified method within this module.

重载

GetMethodToken(MethodInfo)

返回用于标识此模块内指定方法的标记。Returns the token used to identify the specified method within this module.

GetMethodToken(MethodInfo, IEnumerable<Type>)

返回在此模块用于标识具有指定的特性和参数类型的方法的标记。Returns the token used to identify the method that has the specified attributes and parameter types within this module.

GetMethodToken(MethodInfo)

返回用于标识此模块内指定方法的标记。Returns the token used to identify the specified method within this module.

public:
 System::Reflection::Emit::MethodToken GetMethodToken(System::Reflection::MethodInfo ^ method);
public System.Reflection.Emit.MethodToken GetMethodToken (System.Reflection.MethodInfo method);
member this.GetMethodToken : System.Reflection.MethodInfo -> System.Reflection.Emit.MethodToken
Public Function GetMethodToken (method As MethodInfo) As MethodToken

参数

method
MethodInfo

要为其获取标记的方法。The method to get a token for.

返回

MethodToken

用于标识此模块内的指定方法的标记。The token used to identify the specified method within this module.

例外

methodnullmethod is null.

此方法的声明类型不在此模块内。The declaring type for the method is not in this module.

适用于

GetMethodToken(MethodInfo, IEnumerable<Type>)

返回在此模块用于标识具有指定的特性和参数类型的方法的标记。Returns the token used to identify the method that has the specified attributes and parameter types within this module.

public:
 System::Reflection::Emit::MethodToken GetMethodToken(System::Reflection::MethodInfo ^ method, System::Collections::Generic::IEnumerable<Type ^> ^ optionalParameterTypes);
public System.Reflection.Emit.MethodToken GetMethodToken (System.Reflection.MethodInfo method, System.Collections.Generic.IEnumerable<Type> optionalParameterTypes);
member this.GetMethodToken : System.Reflection.MethodInfo * seq<Type> -> System.Reflection.Emit.MethodToken
Public Function GetMethodToken (method As MethodInfo, optionalParameterTypes As IEnumerable(Of Type)) As MethodToken

参数

method
MethodInfo

要为其获取标记的方法。The method to get a token for.

optionalParameterTypes
IEnumerable<Type>

方法的可选参数类型的集合。A collection of the types of the optional parameters to the method.

返回

MethodToken

用于标识此模块内的指定方法的标记。The token used to identify the specified method within this module.

例外

methodnullmethod is null.

此方法的声明类型不在此模块内。The declaring type for the method is not in this module.

适用于