title: Foreach Loop of Controls in TableLayoutPanel (C# WinForms)
body: <p>I have a TableLayoutPanel with 16 cells, and a label in each (representing times).</p>
  
  <p>I am trying to use a foreach loop to add the times from a list to all the labels.</p>
  
  <pre><code>int i = 0;
  foreach (Control ctrl in tableLayoutPanel1.Controls)
  {
      if (ctrl is Label)
      {
          ctrl.Text = LessonsDAL.times[i];
      }
      i++;
  }
  </code></pre>
  
  <p>Although the text is being added to the labels, the loop seems to be adding the text to the labels in a random order. I am wondering if there are properties of the panel or the labels that would control the order they are being accessed in the foreach loop? It is probably a simple solution, but I just can't find it!</p>
  
  <p>Thank you very much for the help!</p>