1
I’m making a minefield, so I have to add an array of buttons to a panel (to be the houses). I created the button array and added each[x][y] button in a panel. But I don’t know how to retrieve the click on a certain [x][y] button inside my matrix. I know only generate the event for a button, I do not know how I can "generalize" to others, for example, when the button[2][3], inside my matrix is clickado I receive a "button[2][3] was clickado" or "the clickadas positions were x = 2, y =3". I know it sounds like an obvious question, but it’s just that I started today in C#. Thank you.
There’s more than one way to solve this problem. I think it’s easier to answer your question if you give an example of the code you tried to use (try to do something simplified that only prints a message on the screen)
– hugomg