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 should use the TryParse method for the int
string text1 = "x"; int num1; bool res = int.TryParse(text1, out num1); if (res == false) { // String is not a number. }