InstructionEncoder.Switch(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
開始編碼交換指令。
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
參數
- branchCount
- Int32
指令將擁有的分支數量。
傳回
SwitchInstructionEncoder A會用來發出分支標籤。
例外狀況
branchCount 小於或等於零。
Branch(LabelHandle) 並未精確地呼叫回傳值 branchCount 的次數。
備註
在以其他方式使用此InstructionEncoder方法之前,必須精確地對回傳的值branchCount呼叫該方法Branch(LabelHandle)。 若未完成,將導致 。InvalidOperationException