H
Husam
Hi EveryBody:
How can I write a byte array to FileStream, I tried to do so and I use the
following code:
Dim rawan As New List(Of Byte())
Dim msg() As Byte = CType(rawan(TextBox1.Text), Byte())
Dim File_Name As String = "Winter.jpg"
Dim fs As New FileStream(File_Name, FileMode.CreateNew)
' Create the writer for data.
Dim w As New BinaryWriter(fs)
' Write data to Test.data.
Dim i As Integer
For i = 0 To msg.Length
w.Write(CInt(i))
Next i
w.Close()
fs.Close()
But I got the following message Can not can't not access file. So how can I
write my data to file or file stream? any help will be appreciated
regard's
Husam
How can I write a byte array to FileStream, I tried to do so and I use the
following code:
Dim rawan As New List(Of Byte())
Dim msg() As Byte = CType(rawan(TextBox1.Text), Byte())
Dim File_Name As String = "Winter.jpg"
Dim fs As New FileStream(File_Name, FileMode.CreateNew)
' Create the writer for data.
Dim w As New BinaryWriter(fs)
' Write data to Test.data.
Dim i As Integer
For i = 0 To msg.Length
w.Write(CInt(i))
Next i
w.Close()
fs.Close()
But I got the following message Can not can't not access file. So how can I
write my data to file or file stream? any help will be appreciated
regard's
Husam