Visual Basic .NET 2003 Language Changes

Although I’ll be the
first to suggest it should have been up earlier, I wrote a short article about
the new VB.NET 2003 language features…
href=""> face="Trebuchet MS" color=teal>and it is up on MSDN now face="Trebuchet MS" color=teal>.

Comments (2)

  1. Glen says:

    Duncan, thanks for the article on language changes. I’m curious about the scope of loop control variables. Given this pseudocode:

    <PRE class=code>Dim counter As Integer

    For i as Integer = 0 To 10

    For j as Integer = 0 to 10





    will it produce an error? I assume not since the inner loop should be able to access the variable since it’s still in the scope of the outer loop. And I would assume that after the inner loop is complete, referencing j would give an error. Would I be correct?

  2. Glen…

    Yep, you are correct… the inner loop is still within the scope of the outer, so the i variable is valid within the inner loop, but j is not available outside of the inner loop….

    hope that is clearer than it seems when I read it…