The process of converting the value types to reference types is known as Boxing.
example: int x=100; //stored to stack;
object obj=x; //stored to heap.
The Reverse of the boxing i.e converting reference type to value type is called as UnBoxing.
example : int y=(int)obj;
example: int x=100; //stored to stack;
object obj=x; //stored to heap.
The Reverse of the boxing i.e converting reference type to value type is called as UnBoxing.
example : int y=(int)obj;
Nice post very helpful
ReplyDeletedbakings