What is the difference between Boxing and Unboxing in C#



What is the difference between Boxing and Unboxing in C#..

Answer / preetha

Boxing is a process in which object instances are created
and copy values in to that instance.
Unboxing is vice versa of boxing operation where the value
is copied from the instance in to appropriate storage
location.
Below is sample code of boxing and unboxing where integer
data type is converted in to object
and then vice versa.
Dim x As Integer
83
Dim y As Object
x = 10
‘ boxing process
y = x
‘ unboxing process
x = y

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More VC++ AllOther Interview Questions

Difference between getmessage, postmessage & peakmessage.

0 Answers  


What is a thread (VC++) and state the difference between Cmutex and Csemaphone?

0 Answers   Atos Origin,


What is the difference between the client and non-client areas?

2 Answers  


hi i have 1180 in gre and 109 in toefl i have one more backlog to clear now. My classes got over in 2007 july. can i put a course completion certificate for my f1 visa interview. plz help

2 Answers  


Can I uninstall visual c++ 2005?

0 Answers  






What are some differences between a form view and a dialog box?

2 Answers   DS Group, Manipal Ecommerce,


What is iunknown? Explain some of commonly used methods provided by iunknown.

0 Answers  


Is it safe to uninstall microsoft visual c++ 2008 redistributable?

0 Answers  


Is visual c++ a compiler?

0 Answers  


Differences between vc 6.0 and vc 7.0

1 Answers   Honeywell,


What is cmutex?

0 Answers  


What is a glyph?

2 Answers  


Categories