MetadataTokens.GetHeapOffset Method

Definition

Overloads

GetHeapOffset(BlobHandle)

Gets the offset of metadata heap data that corresponds to the specified handle.

GetHeapOffset(GuidHandle)

Gets the offset of metadata heap data that corresponds to the specified handle.

GetHeapOffset(Handle)

Gets the offset of metadata heap data that corresponds to the specified handle.

GetHeapOffset(StringHandle)

Gets the offset of metadata heap data that corresponds to the specified handle.

GetHeapOffset(UserStringHandle)

Gets the offset of metadata heap data that corresponds to the specified handle.

GetHeapOffset(MetadataReader, Handle)

Gets the offset of metadata heap data that corresponds to the specified handle in the context of reader.

GetHeapOffset(BlobHandle)

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

Gets the offset of metadata heap data that corresponds to the specified handle.

C#
public static int GetHeapOffset(System.Reflection.Metadata.BlobHandle handle);

Parameters

handle
BlobHandle

Returns

Zero based offset, or -1 if handle can only be interpreted in a context of a specific MetadataReader or MetadataBuilder.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.NET 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)

GetHeapOffset(GuidHandle)

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

Gets the offset of metadata heap data that corresponds to the specified handle.

C#
public static int GetHeapOffset(System.Reflection.Metadata.GuidHandle handle);

Parameters

handle
GuidHandle

Returns

1-based index into the #Guid heap. Unlike other heaps, which are essentially byte arrays, the #Guid heap is an array of 16-byte GUIDs.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.NET 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)

GetHeapOffset(Handle)

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

Gets the offset of metadata heap data that corresponds to the specified handle.

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

Parameters

handle
Handle

Returns

An offset in the corresponding heap, or -1 if handle can only be interpreted in a context of a specific MetadataReader or MetadataBuilder.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.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

GetHeapOffset(StringHandle)

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

Gets the offset of metadata heap data that corresponds to the specified handle.

C#
public static int GetHeapOffset(System.Reflection.Metadata.StringHandle handle);

Parameters

handle
StringHandle

Returns

Zero-based offset, or -1 if handle can only be interpreted in a context of a specific MetadataReader or MetadataBuilder.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.NET 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)

GetHeapOffset(UserStringHandle)

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

Gets the offset of metadata heap data that corresponds to the specified handle.

C#
public static int GetHeapOffset(System.Reflection.Metadata.UserStringHandle handle);

Parameters

Returns

Zero-based offset.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.NET 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)

GetHeapOffset(MetadataReader, Handle)

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

Gets the offset of metadata heap data that corresponds to the specified handle in the context of reader.

C#
public static int GetHeapOffset(this System.Reflection.Metadata.MetadataReader reader, System.Reflection.Metadata.Handle handle);

Parameters

handle
Handle

Returns

Zero based offset, or -1 if handle isn't a metadata heap handle.

Exceptions

The operation is not supported for the specified handle.

The handle is invalid.

Applies to

.NET 10 och andra versioner
Produkt Versioner
.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