Comments
Sort by recent activity
Hi,
For second sample, more correct:
{
string str = @C:\Program Files (x86);
return str ?? @C:\Program Files (x86);
}
IL of above C#:
0 L_0000: ldstr "C:\Program Files (x86)"
1 L_0005: stloc.0
2 L_0006: ldloc.0
3 L_0007: dup
4 L_0008: brtrue.s 7 -> ret
5 L_000a: pop
6 L_000b: ldstr "C:\Program Files (x86)"
7 L_0010: ret
you can see additional stloc.1 and ldloc.1 make Reflector wrong.
Regards
Wicky / comments
Hi,
For second sample, more correct:
{
string str = @C:\Program Files (x86);
return str ?? @C:\Program Files (x86);
}
IL of above C#:
0 L_0000: ldstr "C:\Program Files (x86)"
1 L_0005: st...
Hi,
Here is another more simple sample to re-produce the case:
0 L_0000: ldstr "C:\Program Files (x86)"
1 L_0005: stloc.0
2 L_0006: ldloc.0
3 L_0007: dup
4 L_0008: brtrue 7 -> stloc.1
5 L_000d: pop
6 L_000e: ldstr "C:\Program Files (x86)"
7 L_0013: stloc.1
8 L_0014: ldloc.1
9 L_0015: ret
Current output:
{
// This item is obfuscated and can not be translated.
string str = @C:\Program Files (x86);
if (str != null)
{
goto Label_0013;
}
return @C:\Program Files (x86);
}
It should be:
{
string str = @C:\Program Files (x86);
if (str != null)
{
return str;
}
return @C:\Program Files (x86);
}
Hope it helps.
Regards
Wicky / comments
Hi,
Here is another more simple sample to re-produce the case:
0 L_0000: ldstr "C:\Program Files (x86)"
1 L_0005: stloc.0
2 L_0006: ldloc.0
3 L_0007: dup
4 L_0008: brtrue 7...