I have write some function to create an exe file using ILGenerator. What I want is to show to user the IL language generated whithout using external tools like ILDasm or Reflector.
during the execution of my program I have added each OpCode to ILGenerator, so I can save each of this OpCode in a list using a string with the OpCode representation but I wish prefer to get the IL code directly. Can it be done?
Important: I’m using Mono 2.6.
As Hans Passant and svick had said, the answer is Mono.Cecil. Let’s see:
Sure it can be done more efficient but it solves my problem.