I have disassembled some code, using telerik JD, and I notice that some labels are omitted, and portion of the code is useless.
IL:
.method assembly hidebysig instance void xxx (
int32 p_intPer
) cil managed noinlining
{
IL_0000: br.s IL_000a
IL_0002: call
IL_0007: ldnull
IL_0008: ldind.ref
IL_0009: pop
IL_000a: ldc.i4.0
IL_000b: brtrue.s IL_0007
.try
{
IL_000d: ldarg.0
IL_000e: ldfld class [Reader]aaa bbb::getP
IL_0013: brfalse IL_0024
IL_0018: ldarg.0
IL_0019: ldfld class [Reader]aaa bbb::getP
IL_001e: ldarg.1
IL_001f: callvirt instance void [Reader]aaa::Invoke(int32)
IL_0024: leave IL_002f
}
catch [mscorlib]System.Object
{
IL_0029: pop
IL_002a: leave IL_002f
}
IL_002f: ret
}
C#:
internal void xxx(int per)
{
while (0 != 0) { }
try
{
if (this.getP != null)
{
this.getP(per);
}
}
catch { }
}
I mean IL_0000 -> IL_0002 -> IL_0007
Is the decompiler stupid, or is it normal? Also, I'm not very skilled in IL, but this doesn't look like the actual source C# to me