怎样获取控件引用
neeme 2007-05-17 11:22:37 在一个WinForm 中有 10 Lable
有一个 string[] str = new string[10];
原来很笨的方法
Lable0.Text = str[0];
Lable1.Text = str[1];
Lable2.Text = str[2];
Lable3.Text = str[3];
Lable4.Text = str[4];
.....
请问有好的方法吗:
for(int i=0; i<10; i++)
{
???.Text = str[i];
}
谢谢!