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

what is the diference between casting and converting?

Answer Posted / praveen

The Convert.ToInt32(String, IFormatProvider) underneath
calls the Int32.Parse. So the only difference is that if a
null string is passed to Convert it returns 0, whereas
Int32.Parse throws an ArgumentNullException.

It is really a matter of choice whichever you use.

Also have a look at the new .NET 2.0 method Int32.TryParse,
which attempts to convert a string to an int without
throwing an exception.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is virtual method in c#?

1241


What is multicast delegate explain with example?

1074


What is a linked list c#?

930


Does c# have its own class library?

1025


What are c# i/o classes?

1069


What is the difference between yield and return?

945


How you will create satellite assemblies?

1029


What are generations and how are they used by the garbage collector?

973


Can structs in c# have destructors?

1033


How do I unload an assembly?

1000


What is the difference between system.text.stringbuilder and system.string?

1078


Can I use exceptions in c#?

1041


Why data types are important in c#?

981


Why do we use struct in c#?

1011


What are custom exceptions? Why do we need them?

1029