title: Using a string in place of an object when accessing it
body: <p>First off I'm sure that I am using the wrong terminology here but I will fix it if someone comments on it. Please be gentle.</p>
  
  <p>So I have multiple <code>charts</code> on a page and I am performing virtually identical actions on each. For demonstrative purposes lets call my <code>charts</code> something like: <code>chart1</code>, <code>chart2</code>, ..., <code>chartn</code> where <em>n</em> is somewhere in the vicinity of 20. What I would like to do is drop this in a <code>for</code> loop and perform all the work in one smaller chunk of code, especially if I have to tweak it later. </p>
  
  <p>So my question is whether or not I can vary the <em>n</em> part representing the object (terminology?) so I can get this done more efficiently. </p>
  
  <p>i.e.:</p>
  
  <pre><code>for(int i = 0; i &lt; 20; i++)
  {
      String chartName = "chart" + i;
      chartName.Series.Clear();
  }
  </code></pre>
  
  <p>I have a feeling you can't do this with a string so I was looking into doing a <code>foreach</code> but I don't know how to do this with charts.</p>
  
  <p>Thanks a lot!</p>