I've got a program that will be running over a long duration (hours), and regularly writing output to a text file.
I'm looking to use a TextWriter implementation to write to the file, and I am concerned that keeping the file locked open during the entire length of operations may be problematic.
First question: Will there be performance problems (or other kinds) for keeping a stream open to a file for an extended duration?
If so, will a StreamWriter (opened with File Name constructor) manage opening and closing the file on a regular buffered basis for me, or will it hold the file open for the duration of its existence?
Lastly, is there a built in option for handling these more long-duration writes? Or will I need a custom Writer/Stream implementation?