title: How can I compose variables names through loop in C#?
body: <p>I have rewritten this question because not everyone understood. Hope it's ok, it's the same main problem.Very sorry</p>
  
  <p>I have a winform with 15 progress bars called: "baraClasa1", "baraClasa2", "baraClasa3" ... "baraClasa15". I have to assign the .VALUE property (as in <strong>int</strong>) to all of them, from some database records. (The records access the different values from different time periods)
  I was thinking that maybe it is possible to use a loop to assign the .Value property to all of them by doing something like:</p>
  
  <pre><code>for(int i=0; i&lt;value; i++)
  {
     "baraClasa+i".Value = 20 + i;  
  }
  </code></pre>
  
  <p>Is it possible to compose the name of the variables like that?</p>
  
  <p>I don't know much about dictionaries, lists but looking into. If nothing works il just do the ugly:</p>
  
  <pre><code>int value = 20;
  baraClasa1 = value;
  baraClasa2 = value +1;....
  </code></pre>
  
  <p>Thank you for all help</p>