I want to reference a GroupBox name using a string.
My code currently works. I want to change this line of code:
Line1.buttonName.BackgroundImage = CircleColours[i];
Line1 is the GrouBox name. I'd like to be able to change Line1 to a string. Like this:
string groupBoxName = "Line1";
groupBoxName.buttonName.BackgroundImage = CircleColours[i];
The code doesn't work when I do this though. What do I need to change?