我通读了文本文件的行,但在空白行处中断。
Using sr As New StreamReader(openFileDialog1.OpenFile())
Dim text As [String] = sr.ReadToEnd()
Dim lines As String() = text.Split(vbCrLf)
For Each line As String In lines
Dim cleanline = line.Trim()
Dim words As String() = cleanline.Split(" ")
For Each word As String In words
If word.StartsWith("a", True, Nothing) OrElse word.StartsWith("e", True, Nothing) OrElse word.StartsWith("i", True, Nothing) OrElse word.StartsWith("o", True, Nothing) OrElse word.StartsWith("u", True, Nothing) OrElse word.StartsWith("y", True, Nothing) Then
System.Console.Write(word & "ay ")
Else
Dim mutated As String = word.Substring(1, word.Length - 1)
mutated = mutated & word.Substring(0, 1) & "yay "
System.Console.Write(mutated)
End If
Next
System.Console.Write(vbLf)
Next
End Using
我正在使用这个输入。
我收到此错误:
我应该改变什么来防止这个运行时错误并继续处理?