ILOpCodeExtensions.GetBranchOperandSize(ILOpCode) Method

Definition

Calculates the size of the specified branch instruction operand.

C#
public static int GetBranchOperandSize(this System.Reflection.Metadata.ILOpCode opCode);

Parameters

opCode
ILOpCode

The branch op-code.

Returns

1 if opCode is a short branch, or 4 if it is a long branch.

Exceptions

The specified opCode is not a branch op-code.

Applies to

Product Versions
.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)