IsNumeric

 public static bool IsNumeric(this string theValue)
        {
            long retNum;
            return long.TryParse(theValue, System.Globalization.NumberStyles.Integer, System.Globalization.NumberFormatInfo.InvariantInfo, out retNum);
        }
Example:
string value = "abc";
bool isnumeric = value.IsNumeric();// Will return false;
value = "11";
isnumeric = value.IsNumeric();// Will return true;

Description

Checks if a string value is numeric according to you system culture.

Details

Double click on the code to select all.

 

;