Imports System.IO public class Tester public Shared Sub Main Dim myfile As System.IO.File Dim w As System.IO.StreamWriter On Error GoTo errorhandle w = myfile.AppendText("a:\temp.txt") w.Write("a") w.Close() Exit Sub errorhandle: Console.WriteLine("Please Insert") Exit Sub Resume End Sub End class
Please Insert