in Dot Net by
Q:

What are Boxing and Unboxing?

▼ Show 1 Answer

0 votes
by

Converting a value type to reference type is called Boxing.

For Example:

int Value1 -= 10;

//————Boxing——————//

object boxedValue = Value1;

Explicit conversion of same reference type (created by boxing) back to value type is called Unboxing.

For Example:

//————UnBoxing——————//

int UnBoxing = int (boxedValue);

Learn More with Madanswer

Related questions

+1 vote
asked Jun 25, 2019 in Dot Net by Venkatshastri
...