Thanks for your reply,
I know about the isnumeric, but ... whatever number value will return true
with isnumeric, so I hope to get something like isInteger() ...
As noted before, for a positive integer, you can just say:
if(x > 0)
To test whether x is in integer, you can say:
x = int.Parse(value.ToString())
where value is the number you want to check.
If value represents an integer, x will contain it after
the step given above. Else an FormatException will be
thrown.
For more details you can check out int.Parse in MSDN.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.