Within programming languages which have both reference and value types, boxing is the act of converting a value type to a reference type. In other words, boxing is the act of taking a reference to a variable. C# and .NET talk about boxing by this name, and C# allows boxing to occur implicitly.

While Java has both primitive (i.e. value) and reference types, it takes a slightly different approach, in that wrapper classes are provided to allow the primitive types to be used as objects are.

The opposite of boxing is of course unboxing, which converts a reference type to a scalar type, or equivalently performs a dereferencing operation.