Beginner
C#
Q35 / 100
What is boxing in C#?
Correct! Well done.
Incorrect.
The correct answer is B) Converting a value type to a reference type (object) by wrapping it on the heap
B
Correct Answer
Converting a value type to a reference type (object) by wrapping it on the heap
Explanation
object o = 42; boxes the int 42 onto the heap. int x = (int)o; is unboxing. Excessive boxing/unboxing impacts performance.
Progress
35/100