What is Boxing and Unboxing?

Answer Posted / karthik

Boxing:Focing an value type into referencetype is known as boxing.
EX:int a=10;
object obj;
obj=a;
Unboxng:forcing an reference type into value type is known as unboxing.
EX:
int b:
b=(int)obj;
unboxing should be done explicitly using datatype casting.

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 asp.net globalization?

495


What is gridview in asp.net?

518


What are the parts of an http response?

494


What is viewstategenerator?

691


How can you debug your.net application?

554






What is asp.net futures?

569


What is Model-View-View Model?

605


Define web.config in .net?

637


what is publisher?

1648


when a request is made in Life cycle of ASP.NET page .

527


How do you implement sql caching in asp.net?

561


How can we inherit a static variable?

537


What is strong-typing versus weak-typing?

579


Briefly describe the role of global.asax?

577


Explain About WebService

649