String In Csharp

 

Saturday, May 30, 2009

Detect if string is numeric

// Detect if a string is numeric

public static bool IsNumeric(string text)
{
return Regex.IsMatch(text,"^\\d+$");
}

No comments:

Post a Comment

All Menu