Two interesting notes from current reading:
1. You can write code that runs IL commands directly if you’re current language doesn’t support a specific command.
2. ILDasm.exe and ILAsm.exe. Clearly ILAsm.exe is an intermediate language assembler, so you could write pure IL and compile it straight from there. ILDasm.exe is a lot more interesting.
Rather nicely, ILDasm.exe has a GUI component (go figure). We can visually inspect different different packages, their classes, as well as all of their members:
Right now I can’t see any immediate usage of ILDAsm, but it’s nice to know it’s there.
I did wonder if I could write an unsafe method in C# that would inject IL for me, then compile it into my project to surface otherwise unused IL behavior. Seems like it could also be an attack vector if that’s the case.