private static bool IsWholeNumber(string strNumber) { var objNotWholePattern = new Regex("[^0-9]"); return !objNotWholePattern.IsMatch(strNumber); }