This is in WinForms. and i am using microsoft.vsualbasic.powerpacks
how can i concatenate Rectangle control name in c# this is what i have so far
string n = "1";
Rectangle match = this.Controls.Find("rectangleShape" + n,true)[0] as Rectangle;
match.BackColor = Color.Red;
Here's a working example based on the solution I linked to in the comments. Note that the BackStyle property of your RectangleShape needs to be Opaque for you to see the color you set!
This code will set the BackColor of rectangeShape1 thru rectangeShape3 to Red: