No it isn't. You wouldn't normally use FileStream for text but it's actually not that difficult.
vb.net Code:
Dim writer As New IO.FileStream(filename, IO.FileMode.OpenOrCreate, IO.FileAccess.Write) Dim s As String = "Name Surname" ' for example Dim b(s.Length - 1) As Byte For i = 0 To b.Length - 1 b(i) = BitConverter.GetBytes(s(i))(0) ' it will always be one byte for a character Next writer.Write(b, offset, b.Length) ' bytearray, position, length writer.Close()




Reply With Quote