【发布时间】:2011-03-21 16:37:33
【问题描述】:
正如 Eric Gunnerson 在 this 博客文章中所展示的,在 C# 中,您可以将 using 语句嵌套为:
using (StreamWriter w1 = File.CreateText("W1"))
using (StreamWriter w2 = File.CreateText("W2"))
{
// code here
}
在 VB.Net 中是否有类似的方法?我想避免太多的缩进级别。
【问题讨论】: