Probably not too useful, as you will most likely need the actual int (although it can be extended to do this). NOTE. I would not do that, but it IS an alternative way, which he did not think.
bool isNumeric = true;
foreach (char c in queryString) {
if (!char.IsDigit(c)) {
isNumeric = false;
break;
}
}
source
share