Michel,
I would take the FileStream and pass it to a StreamReader, along with
the return value from the static property ASCII on the Encoding class (found
in System.Text). Once you have that, you can just call ReadLine on the
stream reader, and it will allow you to read the contents line by line.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Michel Racicot" <mi*********************@cgi.com> wrote in message
news:el**************@TK2MSFTNGP10.phx.gbl...
I need to read a null terminated ASCII string from a FileStream. How can I
do that? I know that with FileStream.ReadByte, I can read until I get a
byte == 0 but how can I convert a single byte to a character? Is there a
way to do this easier?