What is Boxing and UnBoxing in .Net



Converting value type to reference type is called boxing and converting reference type to value type is called as unboxing.

Boxing and unboxing are only the technical terms for type casting from value type to reference type and vice versa.

Access to value types will be fast when compared to reference types. Because they directly contain the value and no need to refer another memory location.

It is recommended to avoid boxing and unboxing in the program wherever it is possible. Because these operations take time and will affect the performance of the application.