I have a program that looks something like this:
public partial class It
{
static StreamWriter logging
= new StreamWriter(new FileStream(@"C:\log",FileMode.Create));
void someFn()
{
logging.WriteLine("foo");
logging.Flush();
/// killed here in debugger with Shift+F5
}
}
The problem it that the file doesn't end in "foo
" and it seems the flush isn't happening. Am I abusing something here? I need a "the bits are in the file when I return" function, does such a thing exist?
Ideal would be that if I break at that point, another process will be bale to see that last line written.