Is there a list of common object that implement IDisposable for the using statement?
Posted
by SkippyFire
on Stack Overflow
See other posts from Stack Overflow
or by SkippyFire
Published on 2009-06-23T15:33:25Z
Indexed on
2010/04/29
12:57 UTC
Read the original article
Hit count: 528
I was wondering if there was some sort of cheat sheet for which objects go well with the using statement... SQLConnection
, MemoryStream
, etc.
Taking it one step further, it would be great to even show the other "pieces of the puzzle", like how you should actually call connection.Close()
before the closing using statement bracket.
Anything like that exist? If not, maybe we should make one.
© Stack Overflow or respective owner