Good, how can I validate phone numbers in c#
but that it only recognizes numbers and () - in its respective format?
I have the following code to validate number but not for the above.
if (Char.IsNumber(e.KeyChar))//Si es número
{
e.Handled = false;
}
else if (e.KeyChar == (char)Keys.Back)//si es tecla borrar
{
e.Handled = false;
}
else //Si es otra tecla cancelamos
{
e.Handled = true;
}