M
moo
Once again, an elegant way of doing it, and I'm sure there's a built-
in library function for it. In Python, Strings have a isdigit()
property that can be used to check if a string contains only digits,
which while I haven't looked at the code I imagine checks if each
character falls within the ascii character range of 0-9, etc.
I could write my own, but I'm sure there's a similar, easy way of
doing it in .Net. Anyone know? Double.isNaN() is out because I only
want integers, and although I can use Convert.ToInt32(), exception
handling seems like a pretty crappy way of doing a conditional (I'm
doing validation)..
in library function for it. In Python, Strings have a isdigit()
property that can be used to check if a string contains only digits,
which while I haven't looked at the code I imagine checks if each
character falls within the ascii character range of 0-9, etc.
I could write my own, but I'm sure there's a similar, easy way of
doing it in .Net. Anyone know? Double.isNaN() is out because I only
want integers, and although I can use Convert.ToInt32(), exception
handling seems like a pretty crappy way of doing a conditional (I'm
doing validation)..