Validating an Integer

csharp
This is a comment thread discussing Validating an Integer
  • 7 years ago

    Sure exception handling uses additional CPU cycles however note that Convert.ToInt32() and double.TryParse() are doing different things. Convert.ToInt32 accepts an object and attempts to convert anything to an int while double.TryParse only accepts strings. This would certainly account for some of the above time.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debuggers don't remove bugs. They only show them in slow motion.”