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 |
What is the difference between pointer and reference?
7 Answers IBM, Microsoft, Tech Mahindra,
What is microsoft visual c++ 2015 redistributable?
Differences between vc 6.0 and vc 7.0
Name the three attributes of a pen?
#include<stdio.h>int(){int a,*b,**c,***d,****e; a=10;b=&a;c=&b;d=&c;e=&c;printf("a=%d b=%u c=%u d=% e=%u",a,b,c,d,e);printf ("%d%d%d\n",a,a+?*b,**c+***d+,****e);return0;}
What is microsoft visual c++ 2005 redistributable?
What is splitter window in vc++?
What is cwinthread class? Explain its advantages.
Do I need microsoft visual c++ on my computer?
What is the value of the expression a = 42?
Name the function is used to transfer bitmaps to an output device?
What is the difference between turbo c++ and visual c++?