Imports System.IO
Module Module1
Sub Main()
Dim s As String = "VB is a great simple programming language"
Try
File.WriteAllText("d:\\file.txt", 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