Thursday, July 06, 2006

The Bumpy Blog : IsNumeric in C#, WHY NOT?

Here is how to do a "IsNumeric in C#":


using System.Text.RegularExpressions;

static bool IsNumeric(string inputString)
{ return Regex.IsMatch(inputString, "^[0-9]+$"); }



I found it here:
The Bumpy Blog : IsNumeric in C#, WHY NOT?: "static bool IsNumeric(string inputString)
{
return Regex.IsMatch(inputString, '^[0-9]+$');
}"

No comments: