In C#, I'm making a platform game. The terrains are pictureboxes, and with the collision systems eg. I need to have 1 name to reference to a number of selected pictureboxes, because it would be too much code to make the same function with another picturebox. So, an example, if "picturebox1" and "picturebox2" is referenced as "pictureall", then, if this code is executed:
pictureall.Visible = false;
both "picturebox1" and "picturebox2" would be invisible. So, how can I reference to (in the example) the 2 pictureboxes with 1 name?
Edit: I'm mostly going to use it in If statements. So, like, as example: if (pictureall.Visible == true) MessageBox.Show("true"); If then any picturebox is visible, it would be true.
/Viktor