Welcome to Questionaries, where you can ask questions and receive answers from other members of the community.

Let us know at info@questionaries.org

Difference between boxing and unboxing?

2 like 0 dislike
Hello guys,

What is the difference between boxing and unboxing?

Please tell me about this topic.........

Thanks in advance..............
asked 1 year ago by daneim (127,080 points)

1 Answer

1 like 0 dislike
 
Best answer
Boxing allows us to convert value types to reference types. Basically, the runtime creates a temporary reference-type box for the object on heap.
Eg:
int i=20;
object o=i;
answered 1 year ago by marck_don (191,010 points)

Related questions

3 like 0 dislike
1 answer
asked 1 year ago by marck_don (191,010 points)
2 like 0 dislike
1 answer
4 like 0 dislike
1 answer
3 like 0 dislike
1 answer
4 like 0 dislike
1 answer