title: Changing picturebox backcolor in Visual Studio (c#) using a variable in place of a name
body: <p>I'm trying to make a simple game using a 10x10 grid of empty pictureboxes, and I've run into a very specific problem.</p>
  
  <p>The idea is that the application makes a calculation based on player input and changes the backcolor of specific pictureboxes in the grid. Though how exactly that works isn't really important to this question.</p>
  
  <p>The pictureboxes are named <code>pictureBox1, pictureBox2, etc.</code> (All the way up to 100).</p>
  
  <p>I know that I can change the backcolor with this line of code:</p>
  
  <pre><code>pictureBox1.BackColor = Color.FromArgb(int, int, int);
  </code></pre>
  
  <p>Now let's say the application returns the variable <code>int resultValue = 25</code>, which means that I want pictureBox25 to change its <code>Backcolor</code>.
  Now, if I could just write the code like this:</p>
  
  <pre><code>string pbName = "pictureBox" + resultValue.toString();
  
  pbName.BackColor = Color.FromArgb(int, int, int);
  </code></pre>
  
  <p>...then there wouldn't be a problem. But Visual Studio doesn't seem to accept a string varable in place of a name. </p>
  
  <p>Is there any type of variable it would accept, or is there another way to accomplish what I need without resorting to a giant if-statement.</p>