S
Scott M.
Why does the following code produce a string ("Byte me!") in the output
file, rather than byte data as integers (66 121 116 101 32 109 101 33)?
Dim fs As System.IO.FileStream = System.IO.File.Open("C:\myMessage.dat",
IO.FileMode.Create)
Dim msg As String = "Byte me!"
Dim msgByteArray() As Byte = System.Text.Encoding.Default.GetBytes(msg)
fs.Write(msgByteArray, 0, msgByteArray.Length)
....And, how do I get the output file to have the byte array data?
PS - I know I could use a different Stream type, but I want to do this using
a FileStream.
file, rather than byte data as integers (66 121 116 101 32 109 101 33)?
Dim fs As System.IO.FileStream = System.IO.File.Open("C:\myMessage.dat",
IO.FileMode.Create)
Dim msg As String = "Byte me!"
Dim msgByteArray() As Byte = System.Text.Encoding.Default.GetBytes(msg)
fs.Write(msgByteArray, 0, msgByteArray.Length)
....And, how do I get the output file to have the byte array data?
PS - I know I could use a different Stream type, but I want to do this using
a FileStream.