Search code examples
c#.netilreflectorildasm

Is there any way to retrieve the compiler-generated code from the .NET assembly in a readable form?


For example, if some C# class in an assembly has a property property, compiler generates set_property and get_property methods, or if there is a lambda, compiler also generates helper class c__DisplayClass or something like it. I can see them when I disassemble the assembly using ILDasm, but ILDasm shows me the IL code, which is not very convenient for reading. On the other hand, if I use ILSpy or Reflector, they show me the code I've written, without classes and methods that have been generated by compiler. Is there any halfway method, which allows to see the compiler-generated classes and methods, but in a somewhat readable form, at least more readable than IL?


Solution

  • Oh, my question appeared to be rather stupid, because ILSpy, JustDecompile and, I suspect, other decompilers too, have the option preventing the decompiling of lambdas.