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

When do you absolutely have to declare a class as abstract

1 Answers   Siebel Systems,


How to free the memory that is not used by an object in garbage collection?

4 Answers   IBM,


What's the .NET class that allows the retrieval of a data element using a unique key

1 Answers  


Explain JSON Binding?

0 Answers  


If we want to construct our own Garbage collector what are the steps things we have to do?

3 Answers   Honeywell, Semantic Space,






Is .NET a runtime service or a development platform?

1 Answers  


What are multicast delegates ? give me an example

1 Answers  


What is iobjectset? : Entity framework

0 Answers  


What is meant by domain model?

0 Answers  


Diffence between .net framework 1.0 and 2.0?

2 Answers   DataPoint,


What is .net framwork?

0 Answers  


How to Insert a TextBox value in to Sql database using C#.Net coding

2 Answers  


Categories