Hi, IMHO: Flush() is meaningful only if you dont plan on closing right away; it means "send this through, before I produce more". I use Flush() when tracing a program's progress to a file, so when the program suddenly crashes, the file contains all traces including the very last that was called. FileStream.Dispose(): on .NET 1.1 only exists as Dispose(bool) and is protected, you cant call it; you should call Dispose() for each object that offers a public Dispose(), but you cant call a protected one (unless you are inheriting from the class). on .NET 2.0 exists and is public but the doc says "is not intended to be used directly from your code", so dont call it ! Close() is the one that MUST be called, it tells everything is done. And according to the doc it calls Dispose(bool) itself. Conclusion: call either Flush() if you plan on producing more but want to make sure what you already have gets processed, or Close() if you're done. Dont call both. BTW looking at the (current) implementation is not a sound base for deciding what function to call, reading the doc is. :)
Luc Pattyn [My Articles]