I\'d like to know on C# how to check if a string is a number (and just a number).
Example :
141241 Yes 232a23 No 12412a No
an
You could use something like the following code:
string numbers = "numbers you want to check"; Regex regex = new Regex("^[0-9]+$")); if (regex.IsMatch(numbers)) { //string value is a number }