Variable declaration inside of loops (VB.NET 2003)
A nice language improvement in VB.NET 2003, is that you can
declare variables inside a loop. For example, if I wanted to
construct a For Each loop in VB.NET 2002 I would have to do
it like this:
Dim item As Customer
For Each item
In CustomerCollection
' Do Stuff
Next
In VB.NET 2003, you can do it like this:
For Each item
As Customer In CustomerCollection
' Do Stuff
Next
It's only 1 line shorter, but in my humble opinion, it's a very nice improvement.