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

Any body Having SHAREPOINT Material plzzz? please material to send prasad.k12@gmail.com

0 Answers  


how to do pakaging nd deployment

1 Answers  


Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and passwords). Which one is trusted and which one is untrusted?

3 Answers  


Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe

1 Answers  


What are the authentication types in asp.net?

0 Answers  






How do we ensure view state has not tampered?

0 Answers  


ASP.NET 2.0's new membership API used for creating and managing user account is exposed through which 2 clause?

0 Answers  


What is masterpage?

0 Answers  


How can you provide an alternating color scheme in a Repeater control?

6 Answers   Siebel Systems,


If we remove web.config or machine.config from the application then, is this application will works?

0 Answers  


By default, Web API sends HTTP response with which of the following status code for all uncaught exception?

0 Answers  


What is X-Path?

2 Answers   Sherston,


Categories