简体   繁体   中英

Which code is MSIL? Is the code generated by ILDASM MSIL?

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?

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.

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM