如同VB里面,控件可以起同样的名字,然后用Index来区分。
比如10个Label控件,取名LblTest,然后定义其index属性为1到10,就可以用以下的语句
for(i=1;i<=10;i++)
{
    LblTest(i).Caption="hello";
}