Tuesday, December 1, 2009

i += 1

Here is just a little trick that if you are an old VB6 programmer you might not realize is available in VB.NET. Do you still use i = i + 1 when you need to increment your i counter? well there is a shorter way, just do i += 1 this will increase i by 1. I don't know why they don't let us use i++ it seems this would be pretty easy for the .net framework, but maybe they are trying to not make VB look too much like C#.

No comments:

Post a Comment