Example #1
0
        private void EmitLoopBeginning()
        {
            loopStartLabel     = il.DefineLabel();
            loopConditionLabel = il.DefineLabel();

            iVar = il.DeclareLocal(typeof(int));        // int i

            il.Ldc_I4(0);                               // i = 0
            il.Stloc(iVar);
            il.Br(loopConditionLabel);                  // goto loopConditionLabel

            il.MarkLabel(loopStartLabel);               // label loopStartLabel
        }