It is time to study the Il program. Too many technical points need to be summarized. Prepare to write a series about all of Il.
Let's summarize some notes after reading the video from lava:
Opcode Instruction Set
Il code:
1. Directive statement, starting.
2. Instruction declaration, not starting.
3. entrypoint program entry
4. ANSI, interactive with unmanaged code, marking character sets
5. Auto: automatically optimizes member sorting.
6. hidbysig: Hide the overwriting method in the parent class.
7. Pencil managed to generate managed code
8. Assembly. extern reference external assembly
Cannot display call cctor
After all the local variables are compiled into Il, their original names are lost, instead of V_0, v_1, and so on.
Static variables are initialized to 0; instance variables are not guaranteed to be initialized -- So C # compiler will help check
Ldarg.0 calls 0th variables to the stack.
LDC. i4.2 load constant 2 to the stack
Stfld saves stack data to member variables
Assembly Logic
Module physically
* Vs2005 does not support compiling as a module