answersLogoWhite

0

"Boxing" operations are used whenever a value type is needs to be treated as an object type. You most commonly see this when passing a value type (such as an integer) to a method or parameter that expects an object type.

Simply Boxing means the conversion of the value type on the stack to a object type on the heap, similarly the conversion from an object type back to a value type is called as unboxing.

In object oriented programming languages, methods are called using object. Value types such as int is not object, we cannot use that to call methods. But in C# we can do this with the help of Boxing.

see this:

http://www.authorcode.com/boxing-and-unboxing-in-c/

User Avatar

Wiki User

13y ago

What else can I help you with?