Hi All,
How to differentiate between the beginning and ending of the following
by looking at each instruction in the InstructionCollection?
while, do-while, switch (also beginning and ending of each case) if -
else and for loops
I am doing the following for the if condition(I think will work for
for-loop too). Its working but it doesn't look like its the best way
to do this
if( instructions[i].OpCode.Code == Code.Brtrue_S ||
instructions[i].OpCode.Code == Code.Br_S) && (instructions[i].Next !=
null && instructions[i].Next.OpCode.Code == Code.Nop) // if condition
brace
{
// do something
}
Thanks,
--
--
mono-cecil