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
This might be coming super late!, but I'm sure it will help someone, as it helped me.
private static bool IsDigitsOnly(string str) { return str.All(c => c >= '0' && c <= '9'); }