When is it necessary to flush a file? I never do it because I call File.Close and I think that it is flushed automatically, isn\'t it?
When you want to ensure data integrity as much as possible. For example, what happens if your program crashes before it comes to closing the file?