Imports System
Imports System.IO
Public Class MainClass
Shared Sub Main()
Dim fileName As String
fileName = "test.vb"
Try
Dim stream As StreamReader
stream = New StreamReader(fileName)
Console.WriteLine( stream.ReadToEnd() )
Catch exceptionCatch As IOException
Console.WriteLine("FILE ERROR")
End Try
End Sub ' Main
End Class
|