Scope and how to narrow it using VB.Net
问题 If I want to narrow scope of a variable in C#, I can introduce additional braces - i.e.: class Program { static void Main(string[] args) { myClass x = new myClass(); x.MyProperty = 1000; Console.WriteLine("x = " + x.MyProperty); { myClass y = new myClass(); y.MyProperty = 2000; Console.WriteLine("y = " + y.MyProperty); } myClass y2 = new myClass(); y2.MyProperty = 3000; Console.WriteLine("y2 = " + y2.MyProperty); } class myClass { public int MyProperty { get; set; } } } In the ide, I can no