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

Explain how to implement delegates in c#.net

934


Explain boxing and unboxing in c#?

896


Why do we need nullable types in c#?

1140


What is cli in c#?

926


How to transpose multi-dimensional array?

1058


What are predicates in c#?

922


Explain the difference between directcast and ctype.

978


Explain About .NET Remoting and types of remoting

1060


What is the differences between datagrid, datalist and repeater in .net?

975


Are structs faster than classes?

910


What is an xsd file?

906


Why c# is type safe?

917


What is virtual class in C#?

982


How to use reflection to call generic method?

887


Why do we use delegates?

834