public override void Switch(ILLabel[] labels)
{
if (labels == null)
throw new ArgumentNullException("labels");
// Calculate the size of the instruction and the position of the start of the next instruction.
int instructionSize = 1 + 4 + labels.Length * 4;
int startOfNextInstruction = this.offset + instructionSize;
// Enlarge the array if necessary.
if (this.offset + instructionSize >= this.bytes.Length)
EnlargeArray(instructionSize);
// switch = 45
Emit1ByteOpCode(0x45, 1, 0);
// Emit the number of labels.
EmitInt32(labels.Length);
// Emit the labels.
foreach (var label in labels)
EmitLabel(label, startOfNextInstruction);
}