Can we created common function to check keypress event and restrict user to enter only numeric entries for multiple textboxes in windows form?
Can we create something like below:
private void txtsample1_keypress(...)
{
call validate()
}
private void txtsample2_keypress(...)
{
call validate()
}
public void validate()
{
Here, validation for multiple textboxes
}