Returns true if the text can be converted to a number, otherwise false is returned. Optionally the method can check only for integer values. The conversion attempt is made using the invariant format. Search Microsoft's documentation about "NumberFormatInfo.InvariantInfo".
double IsNumerical(string text; [bool onlyIntegers])
text |
The text to check. |
onlyIntegers |
Optionally check only for integer values. Default false. |
Example
IsNumerical("-320.77")
Returns true.