InstructionEncoder.Switch(Int32) Metoda

Definicja

Rozpoczyna kodowanie instrukcji przełącznika.

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

Parametry

branchCount
Int32

Liczba gałęzi, które będzie miała instrukcja.

Zwraca

Element SwitchInstructionEncoder , który będzie używany do emitowania etykiet dla gałęzi.

Wyjątki

branchCount wartość jest mniejsza niż lub równa zero.

Branch(LabelHandle) Nie wywołano wartości zwracanej dokładnie branchCount razy.

Uwagi

Przed użyciem tej InstructionEncoder metody Branch(LabelHandle) w inny sposób należy wywołać metodę na zwróconej wartości dokładnie branchCount razy. W tym celu zostanie zgłoszony błąd InvalidOperationException.

Dotyczy