ModuleBuilder.GetMethodMetadataToken Method

Definition

Overloads

GetMethodMetadataToken(ConstructorInfo)

When overridden in a derived class, returns the metadata token for the given ConstructorInfo relative to the Module.

GetMethodMetadataToken(MethodInfo)

When overridden in a derived class, returns the metadata token for the given MethodInfo relative to the Module.

GetMethodMetadataToken(ConstructorInfo)

Source:
ModuleBuilder.cs
Source:
ModuleBuilder.cs

When overridden in a derived class, returns the metadata token for the given ConstructorInfo relative to the Module.

C#
public abstract int GetMethodMetadataToken(System.Reflection.ConstructorInfo constructor);

Parameters

constructor
ConstructorInfo

The ConstructorInfo for which to retrieve the token.

Returns

An integer representing the metadata token.

Remarks

Tokens are used to identify objects when the objects are used in IL instructions. Tokens are always relative to the Module.

Applies to

.NET 10 and other versions
Product Versions
.NET 8, 9, 10

GetMethodMetadataToken(MethodInfo)

Source:
ModuleBuilder.cs
Source:
ModuleBuilder.cs

When overridden in a derived class, returns the metadata token for the given MethodInfo relative to the Module.

C#
public abstract int GetMethodMetadataToken(System.Reflection.MethodInfo method);

Parameters

method
MethodInfo

The MethodInfo for which to retrieve the token.

Returns

An integer representing the metadata token.

Remarks

Tokens are used to identify objects when the objects are used in IL instructions. Tokens are always relative to the Module.

Applies to

.NET 10 and other versions
Product Versions
.NET 8, 9, 10