Microsoft's intermediate language (msil) is a language that is output by many compilers (C #, VB. NET, etc. Ildasm (intermediate language anti-assembler) program and. net Framework SDK (frameworksdk/bin/ildasm.exe or program files/Microsoft sdks/Windows/v6.0a/bin) is packaged together to allow users to view msil code in a readable format. With this tool, we can open any. net executable file (exe or DLL) and view its msil code, such as Windows console application (exe), Windows library dynamic link library file (DLL), Windows form (exe) files.
Example:
Create windows form application windowsformsapplication1, code:
Using system;
Using system. Collections. Generic;
Using system. componentmodel;
Using system. Data;
Using system. drawing;
Using system. LINQ;
Using system. text;
Using system. Windows. forms;
Namespace windowsformsapplication1
{
Public partial class form1: Form
{
Public form1 ()
{
Initializecomponent ();
}
Private void form1_load (Object sender, eventargs E)
{
}
}
}
Compile and generate the windowsformsapplication1.exe File
Find isdasm.exeand open windowsformsapplication1.exe in the dialog box.
It can be seen that the form, attribute properties, and program of the Windows form application are included. Expand
You can clearly see several functions of the structure of the form application. Including attribute resources and settings, constructor implementation of each part, and main program entry.
. Ctor is the constructor ,. cctor is a type initializer, and it is also a static constructor in C #. For more information, see the article 《. ctor ,. cctor and object construction process.
Opening other files is similar.