Hi,
How do you append radiobutton names. (radioButton1....and so on)
This is what I have :
String nameRadio = "";
for (int i=0; i < 24; i++){
nameRadio = "radioButton" + i.ToString();
//nameRadio.Checked = false
}
Thanks a bunch.
Appending object names
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

AlanRank #669 · 3.6K reputationPosted Jul 25, 2007, 12:57 PM EDT
for (int i=0; i < 24; i++)
{
RadioButton nameRadio = (RadioButton)this.Controls["radioButton" + i.ToString()];
nameRadio.Checked = false;
}
If the RadioButtons are in a container (such as a GroupBox or Panel) rather than directly on the form, then replace 'this' with the name of the container.