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
int result = 0; bool isValidInt = int.TryParse("1234", out result); //isValidInt should be true //result is the integer 1234
Of course, you can check against other number types, like decimal or double.
decimal
double