Reputation: 3519
I am still confused with which code is called as MSIL.
Among other compilers, C# produces an assembly. ILASM also produces an assembly. Those assemblies contain MSIL?
How about the code generated by ILDASM when taking an assembly as its input? Is the generated code called MSIL?
Upvotes: 0
Views: 1255
Reputation: 28839
MSIL = Microsoft Intermediate Language
MSIL is the output of all .NET compilers. It can be expressed as MSIL assembly code or in binary form - the latter is what you find inside compiled assemblies.
Upvotes: 2
Reputation: 65702
MSIL is the "machine code like" language that the C# compiles your code into.
The CLR is the "machine" that the MSIL runs on.
When runinng the MSIL the CLR converts your code into real machine code using the JIT.
The real machine code is run on your computers actual CPU.
The MSIL Assembler (Ilasm.exe) generates a portable executable (PE) file from Microsoft intermediate language (MSIL). ILDASM is the disassembler to do the opposite.
The PE format is used for EXE, DLL, SYS (device driver), and other file types.
Upvotes: 2
Reputation: 631
The C# Compiler generates an Assembly. The Assembly contains meta-data, and MSIL. The VB.NET (now referred to simply as VB) generates the same thing. The C/C++ Compiler can create MSIL as well. The IL Assembler (ILASM) can take IL and generate an Assembly.
ILDASM is a disassembler. You can find details documenting the IL (MSIL) here.
Upvotes: 2