Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis
Created June 22, 2019 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdyrrahitis/f524939c1b0b3f484355f7a6ea1e0a40 to your computer and use it in GitHub Desktop.
Save gdyrrahitis/f524939c1b0b3f484355f7a6ea1e0a40 to your computer and use it in GitHub Desktop.
.method public hidebysig
instance void CallingMethodWithObjectParam () cil managed
{
// Method begins at RVA 0x2068
// Code size 16 (0x10)
.maxstack 2
.locals init (
[0] int32
)
IL_0000: ldc.i4.s 100
IL_0002: stloc.0
IL_0003: ldarg.0
IL_0004: ldloc.0
IL_0005: box [System.Runtime]System.Int32 // First boxes the value type
IL_000a: call instance void Boxing.Unboxing.Class2::SignatureWithObjectParam(object) // Now calls the method with the boxed value type
IL_000f: ret
} // end of method Class2::CallingMethodWithObjectParam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment