Hi Friends,
I have a numbervalidation method that validate phone no textbox.
What i need is i have different windows forms, so where can i define this method so that i can access it on different forms globally.
Like in VB.NET we have Modules, is their something in C#.NET too.
I am using C# over windows form.
Code is as below:
public void Validation_Number(object sender, KeyPressEventArgs e)
{
if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar))
{
e.Handled = true;
MessageBox.Show("Only Digits are Allowed");
}
}