Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Can we overload indexer in c#?

860


How do you sort a list in c#?

818


How will you allow a class to be inherited, but prevent the method from being over-ridden?

961


Why are strings in c# immutable?

897


What are the different types of constructors?

946


Why c# is called type safe language?

800


Which class does the remote object has to inherit?

1029


What is executereader in c#?

873


Can we have two main methods in c#?

915


What is the difference while using directive vs using statement ?

965


What is difference between first and firstordefault?

885


Give some examples for built in datatypes in c#?

929


Distinguish between finally and finalize blocks?

874


What is boolean conditions in c#?

935


What is yield c#?

826