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 IComparable

977


How long does a loop recorder procedure take?

968


What is the difference between serialization and deserialization in c#?

1015


Should I make my destructor virtual?

1029


Give an example to show for hiding base class methods?

834


Should I use double or float?

882


Is arraylist faster than linkedlist?

919


What is the difference between hashtable and dictionary in c#?

915


Explain what is an interface in c#?

929


What does private void mean in c#?

1052


What is argument in c#?

896


What is reference c#?

952


Explain About a class access specifiers and method access specifiers.

948


What is primitive types in c#?

854


What is the implicit name of the parameter that gets passed into the set method/property of a class?

910