You can also use:
stringTest.All(char.IsDigit);
It will return true
for all Numeric Digits (not float
) and false
if input string is any sort of alphanumeric.
Please note: stringTest
should not be an empty string as this would pass the test of being numeric.