What is boxing and unboxing?

Answers were Sorted based on User's Feedback



What is boxing and unboxing?..

Answer / maruthi

concept of boxing converting value type into reference type,
concept of unboxing converting reference type into value type.

Is This Answer Correct ?    8 Yes 0 No

What is boxing and unboxing?..

Answer / alb.shah

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 ?    6 Yes 0 No

What is boxing and unboxing?..

Answer / aejaz ahmad

Boxing is onverting a vlue type to refrence type (object
type)
Unboxing is converting reffrence type to value type as a
another value type

int i=0;
object o=i; //this is boxing
int i2=(int)o;//this is unboxing
long l=(long)i; //this is casting.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What is boxing and unboxing ?

7 Answers   Accenture, Infosys, MedTek,


what is differences between bind and eval?

2 Answers  


Describe the diffeerence between inline and code behind - which is best in a loosely coupled solution?

0 Answers  


Why do I get error message "could not load type" whenever I browse to my asp.net web site?

0 Answers  


What are asp.net web forms?

0 Answers  






My website has around 100 aspx. Out of this, a certain 20 aspx files should be made available to the users only if they are logged in. How can I achieve this with the web.config file?

1 Answers   Techno Solutions,


How To Send Value one page to Another Page On MasterMenu Click ? please Tell Me!

3 Answers   Accenture,


Should validation (did the user enter a real date) occur server-side or client-side? Why?

4 Answers   Siebel Systems,


To load your generated dataset with data which method do you invoke?

0 Answers   Siebel,


I am trying to implement sorting facility from client side code in GridView Control. So how can I fill up an Array inside client side code (using JavaScript), i want to assign my DataSet object declared and filled up on Server side(in code behind) to the array (on client side)

0 Answers   HCL,


Can we override the enablepartialrendering property of the scriptmanager class?

0 Answers  


What is Difference between Application object and Session Object

5 Answers  


Categories