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 does get set mean in c#?

922


Which of the following operations can you not perform on an ado.net dataset?

973


What is a Command Object in C#?

1032


Why do we use struct in c#?

966


Explain the process of polymorphism with an example?

917


What is a deadlock lock?

929


What is use of abstract class in c#?

935


What is a data set in c#?

940


What is the difference between wrapper class and primitive?

865


What is parse method in c#?

916


Explain how to parse a datetime string?

922


Can we make a Static Constructor Parameterized? Give Reason with your answer

973


Can I define my own exceptions?

879


Why is static constructor called first?

905


Why dependency injection is used in c#?

974