MetadataTokens.Handle Method

Definition

Overloads

Handle(Int32)

Creates a handle from a token value.

Handle(TableIndex, Int32)

Creates an EntityHandle from a token value.

Handle(Int32)

Source:
MetadataTokens.cs
Source:
MetadataTokens.cs
Source:
MetadataTokens.cs
Source:
MetadataTokens.cs

Creates a handle from a token value.

C#
public static System.Reflection.Metadata.Handle Handle(int token);

Parameters

token
Int32

Returns

Exceptions

token is not a valid metadata token. It must encode a metadata table entity or an offset in the UserString heap.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)
UWP 10.0

Handle(TableIndex, Int32)

Source:
MetadataTokens.cs
Source:
MetadataTokens.cs
Source:
MetadataTokens.cs
Source:
MetadataTokens.cs

Creates an EntityHandle from a token value.

C#
public static System.Reflection.Metadata.EntityHandle Handle(System.Reflection.Metadata.Ecma335.TableIndex tableIndex, int rowNumber);

Parameters

tableIndex
TableIndex
rowNumber
Int32

Returns

Exceptions

tableIndex is not a valid table index.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)
UWP 10.0