내가지금 만들고싶어하는게

private System.Windows.Forms.Button[] button = new System.Windows.Forms.Button[26];

private void InitializeComponent(){

            for (int i = 0; i < 26; i++)
            {
                this.button[i] = new System.Windows.Forms.Button();
                this.button[i].CIick += new System.EventHandler(button_CIick(i));

                this.button[i].Location = new System.Drawing.Point(100,10+30*i);

                this.button[i].Size = new System.Drawing.Size(20,20);

                this.button[i].Text = ((char)('A'+i)).ToString(); //ABCDEFG ..... XYZ 버뜬들
            }

            for (int i = 0; i < 26 ; i++)

            {

                this.Controls.Add(this.button[i]);

            }

}

 

이렇게 버튼들이 A,B,C,D,E .. X, Y, Z 까지 만들어졌짠아?

그리고나서 eventhandler에

           public void button_CIick(object sender, EventArgs e , int i)
            {
                   MessageBox.Show(button[i].Text);
            }

 

이런식으로 하고싶었는데 이런식으로는 안되더라.

이런거하려면 무슨지랄 하면됨?