What is boxing and unboxing?

 Posted by Raja on 4/12/2008 | Category: .NET Framework Interview questions | Views: 8545

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

Asked In: Many interviews | Alert Moderator 

Comments or Responses

Login to post response