Use TextReader to read text file : TextReader « Stream File « VB.Net Tutorial






Imports System.IO

Public Class Tester
    Public Shared Sub Main
          Dim trNewFile As System.IO.TextReader
          trNewFile = New IO.StreamReader("test.txt")
          Console.WriteLine(trNewFile.ReadToEnd())
    
    End Sub

End Class








13.22.TextReader
13.22.1.Use TextReader to read text file