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
What kind of the information stored inside the assembly?
What does console writeline do?
How is the syntax written to inherit from a class in C#?Give an example ?
Can we extend static class in c#?
What are sessions in c#?
What can I create with c#?
What is anonymous class in c#?
What is assembly and dll in c#?
Is var a data type?
What is a race condition?
What is verbatim string literal in c#?
Does c# have a 'throws' clause?
explain the nature of the assembly work?
Explain what are the steps for creating clr trigger?
What is property c#?