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
Does visual c++ 2017 replace 2015?
Difference between getmessage, postmessage & peakmessage.
What is microsoft visual c++ 2015 redistributable package x64?
Is it safe to uninstall microsoft visual c++ 2008 redistributable?
How can we use cmutex?
What is ole? How do you handle drag and drop in ole?
What is cmutex?
Do I need all the microsoft visual c++ redistributable?
What is microsoft visual c++ 2013 redistributable package x64?
Explain the advantages of cwinthread class.
How to create a DLL in C++.net 2005 which we can use in VB 6.0 application ?
What is difference between c++ and visual c++?
How do I fix microsoft visual c++ 2015 setup failed?
Explain the significance of initapplication() in vc++.
What is difference between c++ and vc++?