スレッドを使用してファイルから読み取り、コンテンツを処理しています。私は次のコードを持っています:
Dim line As String = Nothing
Dim result As String = Nothing
Dim solved As Boolean
While strReader.EndOfStream <> True
SyncLock strReader
line = strReader.ReadLine()
result = "ERROR"
End SyncLock
solved = False
While solved = False
result = Process(line)
If Not result.Contains("ERROR") Then
solved = True
End If
End While
//some code
End While
そしてそれは私にそのエラーを行に与えます:If Not result.Contains( "ERROR")Then
ラベル付きは問題なく動作しますが、コーディングには適していないと読みました。
このエラーを取り除くにはどうすればよいですか?私は何が間違っているのですか?
ありがとう!