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...

Diff b/w casting and boxing

Answer Posted / ritesh kumar

Boxing is converting a value type to a reference type
(Object Type).Casting is converting a reference type to a
reference type or a value type as another value type.
int i = 0;
object o = (object)i; //this is boxing
int i2 = (int)o; //this is unboxing.

long l = (long)i; //this is casting.

Is This Answer Correct ?    29 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does namespace mean?

888


What is difference between mutable and immutable in c#?

855


How does foreach loop work in c#?

907


What do constructors do in c#?

881


What are strongly typed objects?

870


What is the difference between var and dynamic types in c# 4.0?

935


How do generics work in c#?

863


What is the difference between firstordefault and singleordefault?

847


Is datetime immutable c#?

871


What do you use c# for?

880


Why do I get a syntax error when trying to declare a variable called checked?

950


What are winforms in c#?

861


What are some of the commonly used commands in sqlcommand?

858


What is a thread c#?

867


What is the difference between select and selectmany?

864