I’m trying to write IL that calls methods in mscorlib, but I can’t figure out how to get a ModuleDefinition to mscorlib to actually reference the types & methods, and documentation & google are lacking.
I’m trying to write IL that calls methods in mscorlib, but I can’t figure
Share
Getting a ModuleDefinition for the mscorlib is pretty easy. Here’s a simple way:
But if you inject code that is calling methods in the mscorlib, you don’t necessarily have to load the module yourself. For instance:
Creates an instruction to call Console.WriteLine ();
As for the documentation, please read the importing page on the wiki.