Boxing and Unboxing in C Sharp

Today we will learn about Boxing and Unboxing in C Sharp
Boxing :

Boxing is the process of converting a value type to the reference type. It is implicit conversion.

OUTPUT: 60

Unboxing:

Unboxing is the process of converting a reference type to value type. it is explicit conversion

OUTPUT:100

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *