0

I'm have some problems with using ILSpy. I'm using this tool to decomplie an DLL but it's exist to much garbages. How can i remove "goto" after using ILSpy? :'(

Any suggestions?

Thanks in advance.

ngvntoan
  • 82
  • 1
  • 5
  • 5
    "It's exist to much garbages" ... what does this mean? – Sir Crispalot Nov 06 '13 at 00:04
  • Sorry. Too much "goto" statements existing. I want to simply for reading :) – ngvntoan Nov 06 '13 at 00:43
  • ILSpy is particularly bad at handling certain types of conditional expressions, particularly those with nested assignments. It's not the best at loops, either. I find it is far more likely to produce ugly code with convoluted jump statements than some of its counterparts. I second @ScottChamberlain's recommendation of dotPeek for a free alternative, or Reflector for an excellent (but commercial) solution. – Mike Strobel Nov 07 '13 at 14:34

1 Answers1

4

Your only option is to try a different decomplier and hope it will turn the IL code in to C# code that does not use goto's.

There are many decomplilers out there on the market, another good free one like ILSpy is DotPeek.

However, take note that it also is very possible that the original source actually put goto's in the code, if that is the case there is not much you can do.

Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431
  • Even if the original code had `goto` statements, many decompilers will produce more structured output. ILSpy just happens to be particularly rigid when dealing with complex conditionals and other types of code. – Mike Strobel Nov 07 '13 at 14:37