正如Eric Gunnerson在this博客文章中展示的那样,在C#中,您可以将
using
语句嵌套使用:using (StreamWriter w1 = File.CreateText("W1"))
using (StreamWriter w2 = File.CreateText("W2"))
{
// code here
}
在VB.Net中有类似的方法吗?我想避免太多的缩进级别。