Imports System Imports System.IO Imports System.Text Public Class MainClass Shared Sub Main() Dim file_stream As New FileStream("test.txt", FileMode.Create) Dim bytes As Byte() = New UTF8Encoding().GetBytes("Hello world!") file_stream.Write(bytes, 0, bytes.Length) file_stream.Close() End Sub End Class