For iterating through all textboxes in winforms:
foreach (TextBox TextBox in this.Controls.OfType<TextBox>()) { if (TextBox.BackColor == Brushes.Green) { //your code } }
No comments:
Post a Comment