Is it true that the variables declared within a using statement are disposed together because they are in the scope of the using block?
Do I need to do:
using (SomeIdisposableImplementation foo = new SomeIdisposableImplementation()) { using(SomeIdisposableImplementation2 bar = new SomeIdisposableImplementation2()) { } } or will this be enough and is "bar" disposed together with "foo"?
using (SomeIdisposableImplementation foo = new SomeIdisposableImplementation()) { SomeIdisposableImplementation2 bar = new SomeIdisposableImplementation2(); }
=inSomeIdisposableImplementation2?