E
Ethan Strauss
Hi,
In C#.net 1.1, is there a simple way to determine if an arbitrary object
can be cast as a number? How about if it can be cast as a int? The only ways
I can find are to either try it and see if an error is thrown, or to check
every character in the object cast as a string to see if it fits. Either way
is painful.
I would guess that there is some sort of CheckNumber(),CheckInt()
method, but I can't find it. Can anyone help?
Thanks,
Ethan
In C#.net 1.1, is there a simple way to determine if an arbitrary object
can be cast as a number? How about if it can be cast as a int? The only ways
I can find are to either try it and see if an error is thrown, or to check
every character in the object cast as a string to see if it fits. Either way
is painful.
I would guess that there is some sort of CheckNumber(),CheckInt()
method, but I can't find it. Can anyone help?
Thanks,
Ethan