private void Form1_Load(object sender, EventArgs e)
{
for (int i = 0; i < 10; i++)
{
Button p = new Button();
this.Controls.Add(p);
p.Click += new EventHandler(Button_Click);
}
}
void Button_Click(object sender, EventArgs e)
{
throw new NotImplementedException();
}
温馨提示:内容为网友见解,仅供参考