How to get position of a button in an array on mouse clicked
问题 I have the code that creates a grid of buttons from an array . I need to get their possitions in array on mouse clicked event . Any ideas or links to some other post/articles would be very helpful. The code for creating the grid: // Creating buttons array for 5x5 grid Button[] tiles25 = new Button[25]; // Generating 5x5 button grid void Spawn5x5Grid() { // position of the firts tile int x = 35, y = 55; // current tile index int count = 0; for (int i = 1; i < 6; i++) { for (int j = 1; j < 6; j