Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sometimes I try to write a little bit of IL code or modify bits and pieces here and there (specially modify IL generated from say C# code).
The problem is writing up the complete IL that compiles into an exe is a pain (specially because my usage is to tweak them). To work around this I use the following flow which I thought I'd share
the neat part is the /out parameter which makes ildasm dump a single IL for the entire code. At the beginning I used to try patching the code up by copy-pasting from ILDASM UI which show separate IL code for every method :(
Anonymous
July 30, 2007
PingBack from http://learningdotnet.wordpress.com/2007/07/31/playing-with-il-code/
Anonymous
August 01, 2007
Sir, I found in a msdn blog , a tool just to incorporate the IL codes into the C# file , while COMPILING.
http://blogs.msdn.com/jmstall/archive/2005/02/21/377806.aspx
refer this , interesting clever implementation, but will work only above net 2003.
Anonymous
September 20, 2007
You should take a look at Cecil:
http://www.mono-project.com/Cecil
In their own words: "In simple English, with Cecil, you can load existing managed assemblies, browse all the contained types, modify them on the fly and save back to the disk the modified assembly."
Please sign in to use this experience.
Sign in