Answer the question
In order to leave comments, you need to log in
Is it correct to use a function to create a handler?
Is it correct to use a function to create a control handler?
public static void Validate(ValidateType type, Control control)
{
switch (type)
{
case ValidateType.OnlyNumbers:
{
control.KeyPress += ValidNumbers;
break;
}
case ValidateType.OnlyText:
{
control.KeyPress += ValidNumbers;
break;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question