public override void Emit (CodeGen code_gen, MethodDef meth, PEAPI.CILInstructions cil) { int count = 0; PEAPI.CILLabel[] label_array; if (label_list != null) { label_array = new PEAPI.CILLabel[label_list.Count]; foreach (object lab in label_list) { if (lab is LabelInfo) { label_array[count++] = ((LabelInfo)lab).Label; } else { throw new InternalErrorException ("offsets in switch statements."); } } } else { label_array = new PEAPI.CILLabel [0]; } cil.Switch (label_array); }