Super clear explanation from Rick Deter.

For programmer 30 seconds understanding
Boxing:
int i = 1; // i – a value type
object box = i; // box – a reference object

Unboxing:
int j = (int)box;

Further your reading here.

boxing

Advertisements