What happens in memory when you Box and Unbox a value-type?

Boxing converts a value-type to a reference-type, thus storing the object on the heap.  Unboxing converts a reference-type to a value-type, thus storing the value on the stack

0 comments:

Post a Comment