Label controls aren’t being hit in a foreach loop if the Label is in a GroupBox. If the Labels are outside of a GroupBox they are. How can I get my loop to find them?
foreach (Control c in this.Controls)
{
if (c is Label)
{
if (c.Text == "12/31/1600")
{
c.Text = "Not Found";
}
}
}
1 Answer