2013-10-22 32 views

回答

1

您將需要查看File.ReadLines函數的System.IO命名空間,它將返回IEnumerable(Of String),然後您可以遍歷該函數。

Imports System.IO 
Module Module1 

    Sub Main() 
     Dim lines As IEnumerable(Of String) = File.ReadLines("Your File Path Here") 
     For Each line As String In lines 
      Console.WriteLine(line) 
     Next 
     Console.ReadLine() 
    End Sub 

End Module 
+0

我在我的問題中粘貼了代碼。不知道爲什麼它不顯示,但在這裏又是。 – Barryal

+0

@Barryal在你的問題中沒有看到它,時間戳記最後編輯於2013年10月22日,再試一次。 3年後你還在經歷這個問題嗎? –