title: Array of buttons: change property
body: <p>I have an array of buttons, like this:</p>
  
  <pre><code>int x = 0, y = 0;
  butt2 = new Button[100];
  
  for (int i = 0; i &lt; 100; i++)
  {
      butt2[i] = new Button();
      int names = i;
      butt2[i].Name = "b2" + names.ToString();
      butt2[i].Location = new Point(525 + (x * 31), 70 + (y * 21));
      butt2[i].Visible = true;
      butt2[i].Size = new Size(30, 20);
      butt2[i].Click += new EventHandler(butt2_2_Click); //problem lies here (1)
      this.Controls.Add(butt2[i]);
  }
  
  private void butt2_2_Click(object sender, EventArgs e)
  {
      // want code here
  }
  </code></pre>
  
  <p>I want to change the back color of the button when clicked. I was thinking of passing <code>i</code> to be able to do this:</p>
  
  <pre><code>butt2[i].BackColor = Color.Green;
  </code></pre>