foreach (Control c in Controls) { Label l = c as Label; if (l != null) { l.ForeColor = Color.Red; l.BackColor = Color.Green; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)