Imports System
Imports System.IO
Public Class TextFromFile
Public Shared Sub Main()
Using sr As StreamReader = File.OpenText("MyFile.txt")
Dim input As String
Do
input = sr.ReadLine()
If Not (input Is Nothing) Then
Console.WriteLine(input)
End If
Loop Until input Is Nothing
Console.WriteLine ("The end of the stream has been reached.")
End Using
End Sub
End Class