txtbox1.TextChanged += new EventHandler(txt_TextChanged); txtbox2.TextChanged += new EventHandler(txt_TextChanged); txtbox3.TextChanged += new EventHandler(txt_TextChanged); .....
void txt_TextChanged(object sender, EventArgs e) { errorProvider1.SetError((TextBox)(sender), ""); }
foreach (Control ctrl in this.Controls) { if (ctrl is TextBox) { ctrl.TextChanged += new EventHandler(txt_TextChanged); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)