Variables are not important (although you can save them in one field List<T>if this makes the task easier). The usual way to do this is to browse through the collection Controls(recursively, if necessary).
foreach(Control control in someParent.Controls) {
Button btn = control as Button;
if(btn != null) {
btn.Text = "hello world";
}
}
, ; , :
void DoSomething(Control parent) {
foreach(Control control in parent.Controls) {
Button btn = control as Button;
if(btn != null) {
btn.Text = "hello world";
}
DoSometing(control);
}
}