Search code examples
c#.netreflectordisassembly

Best disassembler tool for the .NET reflector?


What's the best disassembler tool for the .NET reflector?

By best I mean, saving a .NET assembly in a disassembled state in most readable, most likely to compile with fewer changes.

The current one I use doesn't show simplified enumeration but shows the full IEnumerable implementations with MoveNext, etc with member names like:

this.<>4__state
CS$<>9__CachedAnonymousMethodDelegate3

Btw I am not trying to steal code, just trying out certain things on an already existing assembly instead of writing a similar thing from scratch. In the end, it's what I will learn from this that will stay, not the modified assembly.


Solution

  • Red Gate has fixed several bugs with the decompiling and is currently available in the Reflector 7 beta download at: http://reflector.red-gate.com/Download.aspx (it is the big red button to the right of the page).

    You may also want to ensure the disassembler is using .Net 4 optimization - this provides the closest to actual source code for things like automatic properties and other new syntax stuff. You can check this by going to the View -> Options and make sure the item selected in the Optimization list is .NET 4.0.

    Good luck.