Christopher Schene
asked on
How to write out a text stream in VB.NET
Hi,
I want to write out a text stream in VB.NET and I tried this approach. The system doesn't like it because I am trying to write a character to a byte stream
Sub writeMyFile(ByVal path As String, ByVal content As String)
Dim i As Long
Dim myWriter As New System.IO.FileStream(path, IO.FileMode.Create)
For i = 0 To content.Length - 1
myWriter.WriteByte(content .Chars(i))
Next
myWriter.Close()
End Sub
end sub
I want to write out a text stream in VB.NET and I tried this approach. The system doesn't like it because I am trying to write a character to a byte stream
Sub writeMyFile(ByVal path As String, ByVal content As String)
Dim i As Long
Dim myWriter As New System.IO.FileStream(path,
For i = 0 To content.Length - 1
myWriter.WriteByte(content
Next
myWriter.Close()
End Sub
end sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER