@mausch No actual idea, but if I had to guess, using a StreamWriter and manual writes could be a bit dirty pool if you aren't extra-careful.
@mausch saves on typing: using (new StreamWriter(new FileStream(...))) {
Does anyone know *why* MS decided to close the underlying stream when System.IO.StreamWriter et al are disposed?
StreamWriterにEncoding.UTF8を指定するとBOMがくっついてくる、と。ずっとはまってしまった。。
C#のTcpプログラムで華麗に詰まってた。NetworkStreamのくせにStreamWriter/StreamReaderとか使ったら上手く動かない。なにゆえ…?