这样也许能再快点
Dim Dic As new Dictionary(of DataRow, DataRow)
dim drr as datarow
SystemReady = False
For Each dr1 As DataRow In DataTables("结果").DataRows
Dim dr As DataRow
dr = DataTables("配置").Find("[内容] like '*" & dr1("PON口") & " ont " & dr1("ONUID") & " gemport 1*'")
If dr IsNot Nothing Then
dic.add(dr1,dr)
Else
dic.add(dr1,drr)
End If
Next
For Each dr As DataRow In dic.Keys
if dic(dr) isnot nothing then
Dim nr() As String
nr = dic(dr)("内容").split(" ") dr("PVLAN") = nr(4) dr("CVLAN") = nr(13) else
dr("PVLAN") = Nothing
dr("CVLAN") = Nothing end if
Next
SystemReady = True