Inboxing and unboxing in C # (easy to understand ),
Packing and unpacking are the operations to convert the value type and the reference type.
Packing: implicitly converts a value type to an object type, or converts the value type to an interface type applied to this value type, and packs a value type, creates an object instance and copies the value to the object.
Unpacking: In contrast to packing, unpacking refers to explicitly converting an object type into a value type, or explicitly convert an interface type into a value type that executes the interface.
Object obj = null;
Obj = 1; // pack the value type into a reference type.
Int num = (int) obj; // unpack, display type conversion.
The binning operation is opposite to the packing operation. It is used to convert the reference type value stored on the stack to the value type and give the value type variable.
The packing and unpacking operations require additional cpu and memory resources. Therefore, a generic type is introduced after c #2.0 to reduce the consumption of packing and unpacking operations.