Hi to everybody. Lastweek i had taken an interview on c#.
They ask what is boxing & unboxing, Masking.Please tell the
answer and it is useful for me.

Answer Posted / chandu

Boxing:converting from value types to reference type is
known as boxing.
Unboxing:Converting from reference types to value type is
known as unboxing.

boxing ex: int i=1;
obj o=i;

unboxing ex: int i=1;
obj o=i;
int j=int o;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between array and collection?

470


What is reflection c#?

472


What is the advantage of generics in c#?

505


What is the difference between ref and out parameters in c#?

460


What do constructors do in c#?

512






What is constructors, explain with syntax

547


What are circular references?

524


Describe the ways of cleaning up objects in c#.

522


Define method overloading in c#?

590


Explain boxing and unboxing in c#?

509


What you mean by inner exception in c#?

529


What is asynchronous one-way calls?

525


What is a factory in c#?

479


What is mvc firstordefault?

482


What is hashset c#?

496