Thanks Goran...
Sorry, could you explain a lit bit .
so how is this process done?
write a line
?????close, flush or what???
????what do we need here to
read the last line written
"Göran Andersson" wrote:
raulavi wrote:
(a little more info)
after flushing the line (instead of closing streamwirter)
it takes some x time to flush the line
so, when I read from the file I cannot find the last written line.
if I close the streamwriter it does find the line always.
but , my next write fails "Cannot write to a closed TextWriter"
Flushing the StreamWriter doesn't flush the underlying FileStream. You
have to flush that after flushing the StreamWriter for the line to end
up in the file.
--
Göran Andersson
_____
http://www.guffa.com