Imports System
Imports System.IO
Imports System.Text
Public Class Test
Public Shared Sub Main()
Dim path As String = "c:\temp\MyTest.txt"
If File.Exists(path) = False Then
Dim sw As StreamWriter = File.CreateText(path)
sw.WriteLine("A")
sw.WriteLine("B")
sw.WriteLine("C")
sw.Flush()
sw.Close()
End If
Dim sr As StreamReader = File.OpenText(path)
Do While sr.Peek() >= 0
Console.WriteLine(sr.ReadLine())
Loop
sr.Close()
End Sub
End Class