What is boxing and unboxing?

Answers were Sorted based on User's Feedback

What is boxing and unboxing?..

Answer / sri4u_926

Boxing: Converting of Stack based values into the Heap
Based values i.e coverting of a value type to a reference
type is the Boxing.

UnBoxing is vice versa.

Is This Answer Correct ?    41 Yes 1 No

What is boxing and unboxing?..

Answer / maloy.adhikari

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

Is This Answer Correct ?    6 Yes 0 No

What is boxing and unboxing?..

Answer / gowtham

Boxing: To convert value type to reference type.

UnBoxing: To convert reference type to value type.

Is This Answer Correct ?    0 Yes 0 No

What is boxing and unboxing?..

Answer / zeenat

Boxing:- Creating a Instance of a object and passing the
value of a variable to that object
dim x as integer
dim y as object
y = x - Boxing process

x = y - unboxing

Unboxing :- passing a value of a object to the varible

Is This Answer Correct ?    13 Yes 17 No

Post New Answer

More Dot Net Framework Interview Questions

i want to take the fast track training on >net Frame work and work flows and share point could you tellme the good institutes for that cources

0 Answers  

Describe the advantages of writing a managed code application instead of unmanaged one. What's involved in certain piece of code being managed ?

1 Answers  

I want ask from plz smaple example code for Biztalkk server

0 Answers  

What is the difference between string and String

1 Answers  

js fn to go to the particular page when enter is clicked

1 Answers  

What is strong name?

5 Answers  

Microsoft introduced c# as a de facto language of the .NET platform. What is mean by de facto and fot what purpose? Please answer me. Advance thanks.

3 Answers   Excel,

How to add 'ASPNET.mdf' file into server explorer in visual studio 2005?

2 Answers  

what is mean by versioning? Please answer me. Advance thanks.

2 Answers   Excel,

What is the necessity for singning an assembly with a strong name?

1 Answers   L&T,

i have done enough testing in life but now stated developing intereset in development work,Can i think of entering into development work that too in >Net after more then 4 years of testing experiece?

0 Answers  

How to create an alias name for a namespace?

4 Answers   IBM,

  • Dot Net Framework Interview Questions Dot Net Framework (298)
  • Dot Net Remoting Interview Questions Dot Net Remoting (75)
  • Dot Net WindowsForms Interview Questions Dot Net WindowsForms (83)
  • Dot Net General Interview Questions Dot Net General (324)
  • Dot Net AllOther Interview Questions Dot Net AllOther (179)