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.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor