StreamWriter problem

  • Thread starter Thread starter Danny Shi
  • Start date Start date
D

Danny Shi

Hi,
I am trying to write a file using WriteByte after
creating a file stream.

....
FileStream fs = new FileStream
(FILE_NAME,FileMode.OpenOrCreate,FileAccess.Write);
for(i = 0; i < M; i++)
fs.WriteByte(someBitmap.GetPixel(k,j).R);
.....

Apparently Windows adds some new line characters to the
newly created file. How can I avoid this?

Thanks.
Danny
 
Danny Shi said:
I am trying to write a file using WriteByte after
creating a file stream.

...
FileStream fs = new FileStream
(FILE_NAME,FileMode.OpenOrCreate,FileAccess.Write);
for(i = 0; i < M; i++)
fs.WriteByte(someBitmap.GetPixel(k,j).R);
....

Apparently Windows adds some new line characters to the
newly created file. How can I avoid this?

Your subject mentions StreamWriter - how does that come into things?
 
Back
Top