Skip to content

Instantly share code, notes, and snippets.


gdyrrahitis/boxing.cs Secret

Created Jun 22, 2019
What would you like to do?
.method public hidebysig
instance void CallingMethodWithObjectParam () cil managed
// Method begins at RVA 0x2068
// Code size 33 (0x21)
.maxstack 3
.locals init (
[0] int32
IL_0000: ldc.i4 9000
IL_0005: stloc.0
IL_0006: ldstr "It's over "
IL_000b: ldloc.0
IL_000c: box [System.Runtime]System.Int32 // The value type is boxed
IL_0011: ldstr "!"
IL_0016: call string [System.Runtime]System.String::Concat(object, object, object) // Call to Concat method with the boxed value type
IL_001b: call void [System.Console]System.Console::WriteLine(string)
IL_0020: ret
} // end of method Class2::CallingMethodWithObjectParam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment