Thursday 24 May 2012

Validate numeric Inputs with Regular Expressions


 public static bool IsItNumber(string inputvalue)
        {
            Regex isnumber = new Regex("[^0-9]");
            return !isnumber.IsMatch(inputvalue);
        }


No comments:

Post a Comment