Boxing and Unboxing in C#

Boxing Boxing means to convert any value-type to object type or to any interface type implemented by this value type. When the CLR boxes a value type, it wraps the value inside a System.Object instance. In the following example,object o is boxing the integer first. int first=345; object o=first; UNBoxing Unboxing extracts or unwraps the value-type from... Continue Reading →

Create a free website or blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started