differentiate between boxing and unboxingwhen a


Differentiate between Boxing and Unboxing.

When a value type is changed to an object type, the process is known as boxing; while, when an object type is changed to a value type, the process is known as unboxing.

Boxing and unboxing enable value types to be treated as objects. Boxing a value type packages it inside an instance of the Object reference type. This permits the value type to be stored on the garbage collected heap. Unboxing extracts the value type from the object. In this instance, the integer variable i is boxed and assigned to object obj.

 

Request for Solution File

Ask an Expert for Answer!!
DOT NET Programming: differentiate between boxing and unboxingwhen a
Reference No:- TGS0310756

Expected delivery within 24 Hours