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 the method used to load generated dataset with data on the DataAdapter control ?

3 Answers   Siebel,


What is the difference between page directive include and action tag include?

0 Answers  


what is DLL Hell and how it is solved in .NET?

24 Answers   icegen, next, -uk, NIIT,


Describe how to implement globalization and localization in the use interface in .net.

0 Answers  


If iam developing an application that must accomodate multiple security levels though secure login and my asp.net web appplication is spanned across three web-servers (using round-robbin load balancing) what would be the best approach to maintain login-in state for the users?

0 Answers  






Explain login control and form authentication.

0 Answers  


Which is an advantage of application service providers?

0 Answers  


what are the attributes of sitemapnode?

3 Answers   Satyam,


if i want to give an alert message like "try after sometime" to a web page which is being seen by other person.if a web page is not seen by anyone then it should display otherwise it show a display a message stating that other person is viewing so try after some time........how can i implement this.

0 Answers   Siemens,


What do you understand by aggregate dependency?

0 Answers   MindCracker,


What does setting a control's EnableViewState property to false accomplish?

1 Answers  


What is autopostback in asp net?

0 Answers  


Categories