boxing means converting value type to reference type and
unboxing means converting reference type to value type.why
we need boxing and unboxing?
Answer Posted / deepak
actually we need boxing and unboxing to keep more than one type of value type of variables in a common reference type of collection.. so that you can do the common operation in a loop or anywhere else.. by unboxing one by one.. also you can pass that collection to any method.. so you dont need to make many overloaded method for every type of value type..
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Why do we use struct in c#?
Explain About ADO and its objects
What are the advantages of constructor?
How do I create a .exe file?
Which property do we set on a Combo Box to display data on it prior to setting the DataSource ?
in the nunit test framework, which attribute must adorn a test class in order for it to be picked up by the nunit gui?
How many types of serialization are there in c#?
Are c# tuples immutable?
Why dictionary is used in c#?
Why do we use class in c#?
Give some examples of commonly used i/o classes?
What is the symbol used for in c#?
What do you mean by string objects are immutable?
What is ac callback?
What is the use of xmlserializer?