title: Accessing objects in an array based on corresponding object in another array
body: <p>I've recently started coding and I'm trying to make minesweeper with windows forms.
  I have an array, like so:</p>
  
  <pre><code>tiles = new PictureBox[30,16];
  </code></pre>
  
  <p>I also have another array, like this:</p>
  
  <pre><code>mines = new int[30,16];
  </code></pre>
  
  <p>The code for generating the grid of pictureboxes and randomizing the mines works.</p>
  
  <p>I randomize where to put the mines in a separate method and store the locations in the mines array. Now I want a way to access the element in the mines array that corresponds to the index in the picturebox array so that I can calculate what is in that tile.</p>
  
  <p>Anyone have any ideas if this is possible? I have considered using the picturebox.name property to track whether or not there is a mine in a certain tile, but I'm unsure of what effect the name property has. I could probably do it by calculating the coordinates of the mouseclick but I would really like to avoid that.</p>
  
  <p>Any help would be greatly appreciated.</p>