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

542


What is view state and how it works in asp net?

550


How to Separate background image and front image from original picture....

559


How to implement globalization and localization in the use interface in .net.

538


what is loosely coupled solution? How it can be used?

564






Explain how cookies work. Give an example of cookie abuse.

721


Explain the difference between response.redirect vs server.transfer

618


Is it possible to develop a single web application using ASP.NET webforms and ASP.MVC?

600


What is the difference between an htmlinputcheckbox control and an htmlinputradiobutton control?

622


What is Web API Routing?

607


Explain how viewstate is being formed?

542


What is marshalling ? Is it a part of asp.net ?

614


How to prepare culture-specific formatting in .net.

517


How to use push notification?

604


Why is this service branded with windows livetm?

611