On a windows form, there are a group of checkboxes, chx1, chx2, chx3....chx20.
I need to loop through 1-20 and set the Checked property of these checkboxes. Is there a function that would accept the checkbox name as a string, the property to get or set as a string, and the value to set the property)?
Set:
GetSetProperty("chx1", "Checked", true);
or
Get:
GetSetProperty("chx1", "Checked");
foreach(var cb in this.Controls.OfType<CheckBox>()) cb.Checked = true;?