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

What platforms does the .NET Framework run on?

1 Answers  


Explain the advantages and disadvantages of ASP.Net MVC over ASP.NET?

0 Answers  


What is side-by-side execution? Can two application one using private assembly and other using Shared assembly be stated as a side-by-side executables

1 Answers  


Is it possible to create a custom filter?

0 Answers  


Explain encapsulation

1 Answers   HPCL, Hughes Systique Corporation,






how do you mark a property as required? For example, for a project, the name is a required field.

0 Answers   Microsoft,


Where do the reference-type variables go in the RAM ?

1 Answers  


Mention two instances where routing is not implemented or required?

0 Answers   Infosys,


What are html helpers in asp.net mvc?

0 Answers  


Can you draw and explain the .NET Farmework?

2 Answers   Bosch,


What is a model in android?

0 Answers  


What is mapping in entity framework? : Entity framework

0 Answers  


Categories