What is the difference between Boxing and Unboxing in C#
Answer Posted / 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 View All Answers
Do I need the microsoft visual c++?
Is microsoft visual c++ important?
What is cmutex?
how to declare and populate an array of checkBoxes
Can I delete old microsoft visual c++?
What is iunknown?
What is visual c++ runtime?
How do I install microsoft visual c++ 2015?
How to create a DLL in C++.net 2005 which we can use in VB 6.0 application ?
What is vcredist_x86 exe?
What is cmutex? How can we use it?
What is a wizard?
Is it safe to uninstall microsoft visual c++ 2008 redistributable?
What is a thread (VC++) and state the difference between Cmutex and Csemaphone?
What is iunknown? Explain some of commonly used methods provided by iunknown.