About boxing
Please look at this code: string s=10.ToString(); , Is number '10' boxed?There is the IL code for this code:
.locals init (string V_0,
int32 V_1)
IL_0000: ldc.i4.s 10
IL_0002: stloc.1
IL_0003: ldloca.s V_1
IL_0005: call instance string [mscorlib]System.Int32::ToString()
IL_000a: stloc.0
IL_000b: ret
It seemed that no boxing occured. But i am not clear what happened to deal with the code "10.ToSring()", Can you help me to explain that, thanks!
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

bilnaadRank #2,169 · 655 reputationPosted Nov 3, 2004, 12:27 AM EST
wshm19793 reputationPosted Nov 3, 2004, 3:33 PM EST