I have a litte problem here. I have a two-dimensional array which is [5,5] big.
I have a windows form with 25 buttons. Now I want to store the buttons in the object array, but my problem is, how do I tell the program to know which button to put in the array? Is it possible in some kind of this way:
//_array[i] = button(i);
This is my first time storing objects in an array and I dont know how to do that.
EDIT: The buttons have all the standard names (button1,button,button3…)
EDIT2: I know how to it by hand (_array[x,y] = button1) but I want to know how to it ith a for-loop.
You could filter the controls by using
IEnumerable.OfType():