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