Imports System.Text
Imports System.IO
Public Class Tester
Public Shared Sub Main
Dim strSource As String
Dim bteEndode() As Byte
Dim myFileStream As New FileStream("test.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite)
strSource = "asdf"
bteEndode = Encoding.Unicode.GetBytes(strSource)
myFileStream.Write(bteEndode, 0, bteEndode.Length)
myFileStream.Close()
End Sub
End Class
|