What is boxing and unboxing ?

Answers were Sorted based on User's Feedback



What is boxing and unboxing ?..

Answer / pandian

Box is used to convert Value type to reference type(ie.
Object)
Unboxing is the reverse of the boxing.

Is This Answer Correct ?    7 Yes 0 No

What is boxing and unboxing ?..

Answer / hanuman

Boxing is a concept of converting value types into reference types and vice versa is called UnBoxing

Is This Answer Correct ?    0 Yes 0 No

What is boxing and unboxing ?..

Answer / kirti

Boxing:

The conversion of a value type instance to an object, which implies that the instance will carry full type information at run time and will be allocated in the heap. The Microsoft intermediate language (MSIL) instruction set's box instruction converts a value type to an object by making a copy of the value type and embedding it in a newly allocated object.

Un-Boxing:

The conversion of an object instance to a value type.

Is This Answer Correct ?    0 Yes 0 No

What is boxing and unboxing ?..

Answer / kirti

Boxing :- Boxing is an implicit conversion of a value type to the type object type

Eg:-

Consider the following declaration of a value-type variable:

int i = 123;

object o = (object) i;

Boxing Conversion

UnBoxing :- Unboxing is an explicit conversion from the type object to a value type

Eg:

int i = 123; // A value type

object box = i; // Boxing

int j = (int)box; // Unboxing

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net Remoting Interview Questions

What is the proxy of the server object in .net remoting?

0 Answers  


What is the difference between authentication and authorization ?

7 Answers   Digital GlobalSoft, Qatar University,


When do we use delegates in your remoting applications?

0 Answers  


Which namespace is used for encryption ?

3 Answers   Digital GlobalSoft,


When should we choose .net remoting over .net web services?

0 Answers  






How can you create a strong name for a .NET assembly?

2 Answers  


What is UUID and GUID what is the size of this ID ?

2 Answers   DELL,


What is the difference beween the registerwellknownservicetype() and registerwellknownclienttype()?

0 Answers  


What are static assemblies and dynamic assemblies. Differences between them?

0 Answers  


Hello, I want to connect a system in LAN and i want to access that.When ever i am moving a mouse in my desktop the similar thing have to happend in the another system in which i have connected. I need coding for this in c# and .NET . any one please help me.It is very urgent to me Advance thanks. my email id:manojkumarchallagundla@gmail.com

0 Answers   Excel,


What are the consideration in deciding to use .NET Remoting or ASP.NET Web Services?

0 Answers  


How to perform Remoting?

1 Answers  


Categories