Question: So in my Windows forms application (C#) i have a grid of button elements (btn0, btn1, ... , btn200) . I've been looking around for some time now but I couldn't find the answer I was looking for.

The question is how can I change the property of all the button at the same time.
At first I tried formatting a string like this: `"btn" + id`, (the id being the button number) so that I would have every button name in a string. But then I had a problem changing from string to button (type). Is there a way to do that ?
The other thing I tried to do was to create an array of buttons, but haven't had success with that either.

Is one of those two ways possible and how?

Answer: 
Assume that the buttons are all in a control named parent:

```
foreach(Button btn in parent.Controls.OfType<Button>())
{
  // do something with btn
  // eg btn.Text = "New Text";
}

```

If the buttons are directly in the form, use `this` instead of parent. If the buttons are in some kind of a panel, use `panelName` instead of parent.

The above works because as you stated, all the buttons share the same parent. However, if in some other scenario you have buttons in different parents (say panels), you would then need to do some recursion or specify multiple specific parents to loop on).
You can find it by 

`Controls.Find("btn1", true);`

Where `btn1` is the name of the button (the string you generated)