Personally, I would prefer not to use IDisposable implementations in using statements.
So, if you have code like this:
var fs = new FileStream(...);
He would tell you to use it in a using .
The advantage will be that it will warn you about cases where you do not know where the objects to be removed will not be placed in a timely manner.
However, there is enough time when this is a valid situation to NOT declare IDisposable implementations in the using statement for such a rule so that it becomes very fast. Most often, this case accepts the implementation of IDisposable as a parameter of the method.
What I don't mean are class classes in which implementation details eliminate the need to call Dispose (for example, MemoryStream or DataContext ); those that implement IDisposable and should always have Dispose invoked on them, regardless of implementation details, since it is always better to code against the exposed contract.
casperOne
source share