You have to flush the streamwriter. The OS determines when buffered writes actually make it to disk. When object is destroyed it forces a flush.
The stream writer has a function Flush() that will do it for you. It can be bad on performance but you can explicitly call Flush every time you write something.
__________________
A clear conscience is usually the sign of a bad memory.
|