I know a few ways how to check this. regex,int.parse,tryparse,looping.
int.parse
tryparse
can anyone tell me what is the fastest way to check?
the nee
Probably the fastest way is:
myString.All(c => char.IsDigit(c))
Note: it will return True in case your string is empty which is incorrect (if you not considering empty as valid number/digit )