루프 내에서 다음 줄로 이동하거나 다음 줄을 일시적으로 읽을 수 있습니까? 나는 행운을 빌어 요 어떻게 행했는지에 대한 유용한 데이터를 찾지 못했다. 내 추측은 현재 행의 행 번호 (색인)를 찾은 다음 당신이있는 곳에서 +1을 읽는다.StreamReader의 다음 줄로 이동
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
전체 파일을'System.IO.File.ReadAllLines()'로 메모리에서 읽을 수 있습니다. – ja72