Let\'s say I have a disposable object MyDisposable whom take as a constructor parameter another disposable object.
MyDisposable
using(MyDisposable myDisposab
using is an equivalent of
using
MyDisposable myDisposable = new MyDisposable(new AnotherDisposable()); try { //whatever } finally { if (myDisposable != null) myDisposable.Dispose(); }
Thus, if myDisposable does not call Dispose on AnotherDisposable, using won't call it either.
myDisposable
AnotherDisposable