Label Struct

Definition

Represents a label in the instruction stream. Label is used in conjunction with the ILGenerator class.

C#
public readonly struct Label : IEquatable<System.Reflection.Emit.Label>
C#
public struct Label
C#
[System.Serializable]
public struct Label
C#
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct Label
C#
public readonly struct Label
Inheritance
Attributes
Implements

Remarks

The Label class is an opaque representation of a label used by the ILGenerator class. The token is used to mark where labels occur in the IL stream. Labels are created by using DefineLabel(), and their position is set by using MarkLabel(Label).

Properties

Id

Gets the label unique id assigned by the ILGenerator.

Methods

Equals(Label)

Indicates whether the current instance is equal to the specified Label.

Equals(Object)

Checks if the given object is an instance of Label and is equal to this instance.

GetHashCode()

Generates a hash code for this instance.

Operators

Equality(Label, Label)

Indicates whether two Label structures are equal.

Inequality(Label, Label)

Indicates whether two Label structures are not equal.

Applies to

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, 9
.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
.NET Standard 2.0 (package-provided), 2.1