Четене на файлове във VB.NET чрез използване на StreamReader класа.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim fileName As String = "файл.txt" | |
Using reader As StreamReader = New StreamReader(fileName, Encoding.UTF8) | |
While Not reader.EndOfStream | |
'ред | |
Dim line() As String = Split(reader.ReadLine, " ") | |
'действие | |
End While | |
End Using |