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
List the difference between the virtual method and the abstract method?
What is multidimensional array in c#?
Can hashtable have duplicate keys?
What is an escape sequence?
Which is better javascript or c#?
What is the difference between User controls and Custom Controls?
What are the different states of a thread?
What is parsing? How to parse a date time string?
Whats an assembly? Describe the importance of assembly?
What is the default value of object in c#?
What is a static in c#?
What's the c# syntax to catch any possible exception?
What is difference between struct and class in c#?
What is a c sharp?
How many bytes is a char c#?