InstructionEncoder.Switch(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Starts encoding a switch instruction.
public:
System::Reflection::Metadata::Ecma335::SwitchInstructionEncoder Switch(int branchCount);
public System.Reflection.Metadata.Ecma335.SwitchInstructionEncoder Switch (int branchCount);
member this.Switch : int -> System.Reflection.Metadata.Ecma335.SwitchInstructionEncoder
Public Function Switch (branchCount As Integer) As SwitchInstructionEncoder
Parameters
- branchCount
- Int32
The number of branches the instruction will have.
Returns
A SwitchInstructionEncoder that will be used to emit the labels for the branches.
Exceptions
branchCount
is less than or equal to zero.
Branch(LabelHandle) was not called on the returned value exactly branchCount
times.
Remarks
Before using this InstructionEncoder in any other way, the method Branch(LabelHandle) must be called on the returned value exactly branchCount
times. Failure to do so will throw InvalidOperationException.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om