移除註解、雜訊後,核心 IL 如下:
.assembly mukhi {}
.class private auto ansi zzz extends System.Object {
.method public hidebysig static void vijay() il managed {
.entrypoint
ldstr "hi"
call void System.Console::WriteLine(class System.String)
call void zzz::abc()
ret
}
.method public hidebysig static void abc() il managed {
ldstr "bye"
call void System.Console::WriteLine(class System.String)
ret
}
}
需完整指定:回傳型別、類別名、方法名、參數型別。類別名不可省略。
.method private hidebysig specialname rtspecialname static void .cctor() il managed {
ldstr "bye"
call void [mscorlib]System.Console::WriteLine(class System.String)
ret
}
輸出順序:bye → hi(.cctor 先於 .entrypoint)