1.

What Happens In Memory When You Box And Unbox A Value-type?

Answer»

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.

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.



Discussion

No Comment Found