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 cookieless session id explain in brief?

0 Answers  


Breifly explain about stack and heap memory Managemet?

2 Answers  


What data type does the RangeValidator control support?

3 Answers   Visual Soft,


How many time you can fill dataset in asp.net?

3 Answers   Syntel, Wipro,


Can we use a static function with a non-static variable?

0 Answers  






Question asked by one of interviewer in panal is given below: We have 2 user control on same page ,1st user control contains textbox and a button while 2nd user control have label. when ever we click on button click of 1st custom control button the value of the textBox will get updated into Label of 2nd custom control. How to do this.Your help will be appreciated.

1 Answers  


What’s difference between “optimistic” and “pessimistic” locking?

0 Answers  


Can you explain one critical mapping? Performance issue which one is better?

0 Answers  


How can you implement encapsulation in asp.net?

6 Answers   TCS,


What is a session in asp.net?

0 Answers  


What are merge modules?

0 Answers  


What are the Difference between asp.net and asp ?

0 Answers  


Categories