You should use the Write overloaded method of signature:
Write ( byte [] data, int start, int length )
To that method you should supply a byte array which you have created by
calling
System.Text.Encoding.[YOUR_PREFERRED_ENCODING].GetBytes("Your string");
So, something like:
string text = "Happy weekend!";
BinaryWriter bw...;
byte [] data = System.Text.Encoding.ASCII.GetBytes(text);
bw.Write(data, 0x0, data.Length);
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"John Demigor" <de*****@hotmail.com> wrote in message
news:ux**************@TK2MSFTNGP11.phx.gbl...
Good hint, thanks. Now the question, how to write string in stream in ANSI
(single-byte) format?