title: Check if button in array was clicked
body: <p>I'm working on a game for a University assignment and need to perform an action if a button is clicked, but it's more complicated than that.</p>
  
  <p>I've created a 2D array of 100 buttons (10x10) to create a tiled, clickable interface (this is  a requirement of the project brief so I absolutely cannot change this method). Each button is randomly assigned a specific BackgroundImage to make up an adventure map (grass, water, trees, ore, etc.), and if they have a certain BackgroundImage and are clicked (trees or ore) I need to add Gold to the Player's gold value for them 'gathering' the item.</p>
  
  <p>The array of buttons is being generated as so:</p>
  
  <pre><code>Button[,] btn = new Button[10, 10];
  for (int x = 0; x &lt; 10; x++)
  {
      for (int y = 0; y &lt; 10; y++)
      {
          btn[x, y] = new Button();
  
          btn[x, y].SetBounds((x * 50) + 8, (y * 50) + 16, 50, 50);
          btn[x, y].Name = x + "," + y;
          Controls.Add(btn[x, y]);
      }
  }
  </code></pre>
  
  <p>How would I be able to detect when one of these buttons is clicked and be able to act accordingly depending on what the BackgroundImage applied to it is?</p>