What you wrote is pretty much a template that using completes. And so this is the using point to keep the need to write the same try....finally block every time you use the Disposable object.
Regarding your edited question
[...] in the second example you really have to put it in a try block anyway, so adding a finally block really doesnโt take much effort
Most likely, you cannot (or do not want to) handle this error from blahblah explicitly, and you just want it to run before the calling code ... but still cleared your StreamWriter resources along the way!
So you are done with this:
StreamWriter writer; try{ writer = new StreamWriter(...) writer.blahblah(); }catch{ throw; // pointless! } finally [ writer.Dispose(); }
source share