Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


ModuleBuilder.GetMethodToken Method

Definition

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

Overloads

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);

Parameters

method
MethodInfo

The method to get a token for.

Returns

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

Exceptions

method is null.

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

Applies to

.NET Framework 4.8.1 és más verziók
Termék Verziók
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

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);

Parameters

method
MethodInfo

The method to get a token for.

optionalParameterTypes
IEnumerable<Type>

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

Returns

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

Exceptions

method is null.

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

Applies to

.NET Framework 4.8.1 és más verziók
Termék Verziók
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1