So how does it decide which instruction label will be used? is this
some sort of index into the number of jump targets? I wonder how the
compiler manages to calculate a jump table when the switch statment
looks like:

switch(someString)
{
case "a":
break;
case "b":
break;
default:
break;
}


On Apr 5, 4:50 pm, Jb Evain <[email protected]> wrote:
> Hey Philip,
>
> On 4/5/09, Philip_L <[email protected]> wrote:
>
> >  Are there any examples out there that show how to use the
> >  OpCodes.Switch statement in Cecil? Do I just pass an array of
> >  Instruction labels as jump targets?
>
> Exactly :)
>
> Switch is just a jump table from 0 to n, where n is the number of targets - 1.
>
> --
> Jb Evain  <[email protected]>
--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to