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

How do you clear a list in c#?

851


What is callback delegate in c#?

818


What is a factory in c#?

829


Define acid rule of thumb for transactions in c#.

845


What is difference between write and writeline in c#?

843


Describe the ways of cleaning up objects in c#.

851


Can you put two constructor with the same structure in a class?

860


Which property do we set on a Combo Box to display data on it prior to setting the DataSource ?

888


What is void in c#?

884


What is collection of classes in c#?

934


Can a constructor be private in c#?

858


What is ac callback?

842


Does a loop recorder have to be removed?

972


Can we override interface method?

900


What is difference between private, protected, and public in C#?

990