I usually program .NET in C #, but I am currently updating a project written in VB.NET and have noticed a curious syntax used in loops For Each.
Is there any difference between
For Each x in collection.Items
...
Next
and
For Each x in collection.Items
...
Next x
?
I saw both in the code here, and I was curious why someone would use the second option.
source
share