' Collection of code snippets by Arne VajhÃ¸j 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Imports System
Imports System.Text
Imports System.IO

Module Main
    Sub Main()
        Dim newFile As StreamWriter
        Dim sFileName As String = "C:\Z.Z"
        Dim indhold As String = "ABCabc123ÆØÅæøå"
        'newFile = New StreamWriter(sFileName, True, Encoding.Default)
        'newFile = New StreamWriter(sFileName, True, Encoding.UTF8)
        newFile = New StreamWriter(sFileName, True, Encoding.GetEncoding(850))
        newFile.WriteLine(indhold)
        newFile.Close()
    End Sub
End Module
