我当然有一个愚蠢的问题,但没有找到答案。
有没有一种方法可以将“For i=...To...”与非连续数字一起使用。
让我解释一下:例如,我有这行代码:
GridView1.Columns(26).BackColor = System.Drawing.Color.Green
GridView1.Columns(27).BackColor = System.Drawing.Color.Green
GridView1.Columns(28).BackColor = System.Drawing.Color.Green
GridView1.Columns(34).BackColor = System.Drawing.Color.Green
GridView1.Columns(35).BackColor = System.Drawing.Color.Green
GridView1.Columns(41).BackColor = System.Drawing.Color.Green
GridView1.Columns(42).BackColor = System.Drawing.Color.Green
'And so on...
有写法From i=26 To 42 In {26,27,28,34,35,41,42}
吗?
谢谢