我正在使用线程从文件中读取并处理内容。我有以下代码:
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
带标签的效果很好,但我读到它们不适合编码。
我怎样才能摆脱这个错误?我究竟做错了什么?
谢谢!