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 is Web.config?
How can I access the registry from c# code?
How to force my .net app to run as administrator on windows 7?
Which namespace is required to implement trace ?
How does c# generics and c++ templates compare?
What is delegate in c# interview questions?
What are the 3 elements of delegation?
Define delegation in .net?
What is cache memory in c#?
How to assign Null value to Var?
What is a c# delegate?
In which way you can convert a value-type to a reference-type?
Why we use delegates in c#?
List the 5 different access modifiers in c#?
There were a lot of questions asked, so I will list the topic (and add a what is "topic" and know pros/cons). Extreme programming, what is a transaction, various SDLC design approaches, what is a namespace, define a good test case, what is a stored proc, webservice? design patterns? linker? compiler? access modifiers? stack vs. queue? arrays vs. linked lists? sorting algorithms? recursion? OOP principles?