Will Boxing and Unboxing happen in Array?

后端 未结 3 1077
礼貌的吻别
礼貌的吻别 2020-12-20 12:19

I\'m new to programming,

As per MSDN,

Boxing is the process of converting a value type to the type object or to any interface type impleme

3条回答
  •  醉酒成梦
    2020-12-20 13:04

    Yes, value type elements (1, 'c' and 12.25) will be boxed when placed into array of object[].

    String "abc" will be placed as is since it is reference type object.

提交回复
热议问题