是否可以在循环内移动到下一行或临时读取下一行?我没有太多运气找到任何关于如何做到这一点的有用数据,我的猜测是以某种方式找到您当前所在行的行号(索引),然后从您所在的位置读取 +1。
Using TestFile As New IO.StreamReader(My.Settings.cfgPath & "tempRPT.txt", System.Text.Encoding.Default, False, 4096)
        Do Until TestFile.EndOfStream
            ScriptLine = TestFile.ReadLine
            ScriptLine = LCase(ScriptLine)
            If InStr(ScriptLine, "update: [b") Then
                Dim m As Match = Regex.Match(ScriptLine, "\(([^)]*)\)")
                builder.AppendLine(m.Value)
                'This is where it would move to next line temporarily to read from it
                If InStr(ScriptLine, "hive: write:") > 0 Or InStr(ScriptLine, "update: [b") > 0 Then 'And InStr(ScriptLine, "setmarkerposlocal.sqf") < 1 Then
                   builder.AppendLine(ScriptLine)
                End If
            End If
        Loop
    End Using