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
I like Linq and to make it exit on first mismatch you can do this
string str = '0129834X33'; bool isAllDigits = !str.Any( ch=> ch < '0' || ch > '9' );