You can simply analyze the number:
private bool ValidateContact()
{
int val;
if (int.TryParse(textBox4.Text, out val))
{
return true;
}
else
{
return false;
}
}
You are trying to call a method that is written for charfor string. You should do them all separately or use a method that is much easier to use, for example, the above code.
source
share