Imports System.IO
Module Module1
Sub Main()
Dim s As String
Try
s = File.ReadAllText("d:\\file.txt")
Console.WriteLine(s)
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub
'run:
'
'file.txt:
'--------
'VB is a great simple programming language
End Module