What is boxing and unboxing ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain remoting?

769


Explain threading types?

817


Explain how can you automatically generate interface for the remotable object in .net with microsoft tools?

731


Define remotable objects in .net remoting?

711


Difference between .net remoting versus distributed com?

748


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

754


Define a process?

710


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

701


Garbage collector?s functionality on unmanaged code ?

3271


How do you directly call a native function exported from a DLL?

7041


Explain how to perform remoting?

714


What are static assemblies and dynamic assemblies?

703


Explain serialization formatters in .net remoting

705


Are you aware of containment and Aggregation ?

2884


What are the difference between static assemblies and dynamic assemblies?

751