E
x
c
e
l
P
T
P

What is Boxing/Unboxing?

February 6, 2014

Boxing is used to convert value types to object. 
E.g. int x = 1; 
object obj = x ; 
Unboxing is used to convert the object back to the value type. 
E.g. int y = (int)obj; 
Boxing/unboxing is quiet an expensive operation.