public static bool IsWholeNumber(this string sItem) { Regex notWholePattern = new Regex("[^0-9]"); return !notWholePattern.IsMatch(sItem); }