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

Do I need microsoft visual c++ on my computer?

0 Answers  


How many time DLLMain gets called?

1 Answers   Microsoft,


What is vcruntime?

0 Answers  


Is visual c++ a compiler?

0 Answers  


Do I need microsoft visual c++ 2005 redistributable on my computer?

0 Answers  






What is difference between c++ and visual c++?

0 Answers  


Is visual c++ still used?

0 Answers  


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

0 Answers   Atos Origin,


What is microsoft visual c++ 2010 x86 redistributable?

0 Answers  


What is the return value when the InsertItem function fails?

2 Answers  


what is the difference between the codes written in the document class and view class

1 Answers  


What is a mnemonic?

1 Answers  


Categories