VB6和NET 写法区别
程序代码:
Form1.Label1.BackColor = Color.LimeGreen Form1.Label2.BackColor = Color.LimeGreen Form1.Label3.BackColor = Color.LimeGreen Form1.Label4.BackColor = Color.LimeGreen Form1.Label5.BackColor = Color.LimeGreen Form1.Label6.BackColor = Color.LimeGreen Form1.Label7.BackColor = Color.LimeGreen Form1.Label8.BackColor = Color.LimeGreen Form1.Label9.BackColor = Color.LimeGreen Form1.Label10.BackColor = Color.LimeGreen Form1.Label11.BackColor = Color.LimeGreen Form1.Label12.BackColor = Color.LimeGreen Form1.Label13.BackColor = Color.LimeGreen Form1.Label14.BackColor = Color.LimeGreen 如何可以变得简单?VB可以控件组,但NET我不太懂,求指点!谢谢 For i As Integer = 1 To 14 Form1.(& "Label" & i).backcolor = Color.LimeGreen Next