Categories

Oct 18, 2019 in C Sharp (C#)

Q: What you mean by boxing and unboxing in C#?

1 Answer

Oct 18, 2019
Boxing – This is the process of converting from value type to reference type. For example,

int myvar = 10;

object myObj = myvar;

UnBoxing – It’s completely opposite to boxing. It’s the process of converting reference type to value type. For example,

int myvar2 = (int)myObj;
Click here to read more about C Sharp
Click here to read more about Insurance

Related questions

Madanswer
Jun 16 in C Sharp (C#)
Mar 26 in SAP
Aug 2 in Insurance
...