C# 8 Using Declaration Scope Confusion
问题 With the new C# 8 Using Declaration Syntax, what is containing scope of a second consecutive using statement? TL;DR Previous to C# 8, having a consecutive using statement like: using(var disposable = new MemoryStream()) { using(var secondDisposable = new StreamWriter(disposable)) {} } would expand to something like the following (My Source): MemoryStream disposable = new MemoryStream(); try { { StreamWriter secondDisposable = new StreamWriter(disposable); try{ {} } finally { if