interviews.dotnetthread.com

↑ Grab this Headline Animator

Friday, May 9, 2008

What is boxing and unboxing?

Converting a value type to reference type is called Boxing and Converting reference type of value type is Unboxing.

int i = 1;
object o = i; // boxing
int j = (int) o; // unboxing

Submit this story to DotNetKicks

No comments:

Post a Comment

Post your comments/questions/feedback for this Article.

 

Latest Articles