.field private static int32 i
.field public int64 j
.method public hidebysig specialname rtspecialname static void .cctor() il managed {
ldc.i4.6
stsfld int32 zzz::i
ldstr "zzzs"
call void [mscorlib]System.Console::WriteLine(class System.String)
ret
}
.method public hidebysig specialname rtspecialname instance void .ctor() il managed {
ldarg.0
ldc.i4.7
conv.i8
stfld int64 zzz::j
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ldstr "zzzi"
call void [mscorlib]System.Console::WriteLine(class System.String)
ret
}
| C# | IL 指令 |
|---|---|
| static 欄位 | stsfld / ldsflda |
| instance 欄位 | stfld / ldflda |
| 區域變數 | stloc / ldloc |
| static 建構函式 | .cctor |
| instance 建構函式 | .ctor |
zzzs → zzzi(靜態建構函式先於實例建構函式)