我有一个我正在循环的数据表...
For Each drIndicator As DataRow In dtIndicatorsToProcess.Rows
有没有办法去偷看"在接下来的几行确定一些事情然后继续?
谢谢!
答案 0 :(得分:2)
你应该使用for循环,如下所示的东西应该合适
For i = 0 To dtIndicatorsToProcess.Rows.Count - 1
Dim drIndicator As DataRow = dtIndicatorsToProcess.Rows(i)
'// Check ahead 2 rows
Dim drRowToCheck As DataRow = dtIndicatorsToProcess(i + 2)
'// Process here
Next