Color newColor = Color.Red; foreach (var lbl in Controls.OfType<Label>()) lbl.ForeColor = newColor;
foreach (Control control in this.Controls) { if (control is Label) { (control as Label).ForeColor = Color.Red; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)