title: Progammically change multiple buttons with for loop C#
body: <p>Im trying to do something like this:</p>
  
  <pre><code>list&lt;int&gt; listName = new list&lt;int&gt;();
  
  for(int i; i &lt;= listName[0];i++)
  {
      button(i).Enabled = false;
  }
  </code></pre>
  
  <p>... to disable all buttons from 1 to i.
  What would be the best way of doing this?</p>
  
  <p>Thanks. </p>