Is Numeric Validation

Nadeemshaik
Posted by Nadeemshaik under C# category on | Points: 40 | Views : 1299
 public bool IsNumeric(string text)
{
bool isNumeric = false;
foreach (char c in text)
{
if (c < '0' || c > '9')
{
isNumeric = false;
}
else
{
isNumeric = true;
}
}
return isNumeric;
}

Comments or Responses

Login to post response