The compiled .Net code becomes IL, which is an intermediate language just like the Javas object code. Yes, you can create your own machine code using the NGen tool. NGen attaches the resulting native image to the machine, so copying the ngen'd binary to another system will not produce the expected results. Compilation of intermediate code allows you to make runtime decisions that otherwise could not (easily) be performed using a statically typed language, such as C ++, and also allows you to work with code on different hardware archetypes, because then the code becomes descriptive about what it is also describes the intent of what should happen in a bit (for example, 32 or 64) -diagnostic path, unlike machine code that only works on 32-bit systems or 64-bit systems, but not both.
In addition, NGen is optional because, as I said, it associates binary with the system, it can be useful when you need the performance of compiled machine code with the flexibility of a dynamically typed language, and you know that binary code will not go to system to which it is not attached.
Geoff
source share