呼叫端將參數推入堆疊;被呼叫端透過 ldarg 系列指令取用。
.method public hidebysig static void vijay() il managed {
.entrypoint
.locals (class zzz V_0, int32 V_1)
newobj instance void zzz::.ctor()
stloc.0
ldloc.0
ldc.i4.s 10
stloc.1
ldloca.s V_1
box [mscorlib]System.Int32
call instance void zzz::abc(class System.Object)
ret
}
.method private hidebysig instance void abc(class System.Object i) il managed {
ldstr "{0}"
ldarg.1
call void [mscorlib]System.Console::WriteLine(class System.String, class System.Object)
ret
}
ldloca.s:載入區域變數位址box:值型別裝箱為物件ldarg.1:載入第 1 個參數(0 為 this)