'BOM無しのUTF8でテキストファイルを作成する

'BOM無しのUTF8でテキストファイルを作成する
Dim sw As New System.IO.StreamWriter("C:\test\1.txt")
'File.CreateTextメソッドを使った時は、次のようになる
'Dim sw As System.IO.StreamWriter = System.IO.File.CreateText("C:\test\1.txt")
sw.Write("こんにちは。")
sw.Close()

ネタ元