I don't think you're reading into what I'm saying. That link that you're pointing to says that Dispose shouldn't raise exceptions. This code is not raising an exception. The Dispose method of System.IO.StreamWriter is throwing an exception. If you want to give someone grief about Dispose methods throwing exceptions, talk to MS. And I think you're misinterpreting the rule. Dispose should not throw an exception unless it is considered a fatal error,
http://msdn.microsoft.com/en-us/library/system.object.finalize(v=vs.110).aspx . As I've already said, your code logic is flawed, and I consider this a valid fatal exception. I understand based on your response that this is an oversimplified example, but I think your actual application does have the same logical error.
The issue is that you need to call Close before the variable goes out of scope. If you do not call Close, then garbage collection is left to dispose of objects in whatever order it sees fit. This causes both a logical and practical issue in that you still have data sitting in memory that has not been written out to the file. My biggest suggestion is that if you can, use "using" blocks around all uses of CsvWriter to insure that Close will be called. If you can't do this because of how the object is being passed around between scopes, then you need to insure that the last caller calls Close. You will find that StreamWriter itself works this way and that my suggestion follows many best practices around insuring proper calls to Close/Dispose on objects.
Your suggestion around the IsClosed property seems to match the usage of SqlDataReader more than the usage of StreamWriter, which I think is a more valid comparison. This IsClosed property does not exist on StreamWriter. You could maybe make more of an argument around having this property on CsvReader, but really the need for it on SqlDataReader arises from needing to know if there's more data to be fetched, and different options and frameworks built around that need.
Bruce Dunwiddie