I am trying to select something which is not a Control - An OvalShape.
This works to find a button
string y = "btn_down_" + x;
Button button = this.Controls.Find(y, true)[0] as Button;
How can I do the same thing to find an OvalShape for example: (this doesn't work obviously)
string y = "ovalShape_" + x;
OvalShape light = this.Controls.Find(y, true)[0] as OvalShape;
_____Solution_____
string z = "ovalShape" + (21-x);
OvalShape light = shapeContainer2.Shapes.OfType<OvalShape>().FirstOrDefault(ov => ov.Name == z);