Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Normal
Put the following function in your code:[code=csharp]private bool isNum(string str){ try { int dummy = int.Parse(str); } catch { return false; } return true;}[/code]And then you can use[code=csharp]if (isNum(x.Text)){ int num = int.Parse(x.Text); if ((num < -1)||(num > 9999999)) { // its valid }}[/code]
Put the following function in your code:
[code=csharp]private bool isNum(string str)
{
try { int dummy = int.Parse(str); }
catch { return false; }
return true;
}[/code]And then you can use
[code=csharp]if (isNum(x.Text))
int num = int.Parse(x.Text);
if ((num < -1)||(num > 9999999))
// its valid
}
}[/code]