Is there a way to "flip" the ILGenerator.Emit commands from the IL code?

I am trying to dynamically emit some general method that Ive prototyped in C #. Based on the IL code provided in ILDASM, is there a way to generate an adequate sequence of ILGenerator.Emit () commands that will finally be compiled into the same IL?

Thank you for your help!

+4
source share
2 answers

FWIW: I usually did it manually, but I saw the .NET Reflector plugin that sounds like it will do what you want: ReflectionEmitLanguage . I was curious what this would do, but I really haven't tried.

+1
source

There is an add-on for the popular .NET Reflector decompiler: Locate ReflectionEmitLanguage on Codeplex

0
source

All Articles