Public Class ReadFromFile Shared Sub Main() Dim sFileName As String Dim srFileReader As System.IO.StreamReader Dim sInputLine As String sFileName = "test.txt" srFileReader = System.IO.File.OpenText(sFileName) sInputLine = srFileReader.ReadLine() Do Until sInputLine is Nothing System.Console.WriteLine(sInputLine) sInputLine = srFileReader.ReadLine() Loop End Sub End Class
Last Updated on October 26, 2015