Open a stream as ASCII
Imports System
Imports System.IO
Imports System.Text
Class FSOpenWrite
Public Shared Sub Main()
Dim fs As New FileStream("c:\Variables.txt", FileMode.Append, FileAccess.Write, FileShare.Write)
fs.Close()
Dim sw As New StreamWriter("c:\Variables.txt", True, Encoding.ASCII)
Dim NextLine As String = "appended text."
sw.Write(NextLine)
sw.Close()
End Sub
End Class
Related examples in the same category