Label[] la = new Label[10];
for (int i = 0; i<= la.Length-1;i++)
{
la[i] = new Label();
la[i].Text = i.ToString();
la[i].Top = 10 + i*20;
la[i].AutoSize = true;
la[i].Parent = this;
}
多个控件定义事件:
http://www.c-sharpcorner.com/Code/2002/June/OneEventHandlerforControls.asp
for (int i = 0; i<= la.Length-1;i++)
{
la[i] = new Label();
la[i].Text = i.ToString();
la[i].Top = 10 + i*20;
la[i].AutoSize = true;
la[i].Parent = this;
}
多个控件定义事件:
http://www.c-sharpcorner.com/Code/2002/June/OneEventHandlerforControls.asp
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货