title: Update a lot of buttons or checkboxes?
body: <p>I need about 200 buttons that act as indicators with different colors and I have a list with true and false and wonder if there is a way to update them without having to write the names of the 200 buttons.
  Something like this:</p>
  
  <pre><code>while (servoNumber != numberOfServos)
  {
      if (Convert.ToBoolean(ListServo1Inputs[0 + inputToLookFor]) == true) 
      { 
          indicatorS1Di1.BackColor = Color.LawnGreen; 
      }
      else 
      { 
          indicatorS1Di1.BackColor = Color.DarkGray; 
      }
  }
  </code></pre>
  
  <p>But also that the <code>indicatorS1Di1.BackColor</code> counts up to S2 the next row in the loop. Something like: <code>indicatorS[increment number here]Di1.BackColor</code></p>
  
  <p>Maybe this would be a simple solution:</p>
  
  <pre><code>foreach (Control control in tabPage1.Controls.OfType&lt;Button&gt;())
  {
      MessageBox.Show(control.GetType().ToString());
  
      if (control.Name first letters == "indicatorDi")
      {
          control.BackColor = Color.LawnGreen;
      }
  } 
  </code></pre>
  
  <hr>
  
  <p>Thank you very much Rand Random!
  With some small modifications this is what it looks like now:</p>
  
  <p><img src="https://i.stack.imgur.com/N96r9.png" alt="Final look"></p>