Question:

What you mean by boxing and unboxing in C#?

Answer:

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;

Keywords:

© 2017 QuizBucket.org