Home All Groups Group Topic Archive Search About

VB.NET For/Next loops

Author
22 Feb 2006 6:08 PM
Alex C. Barberi
What is the difference between these?

For i = 0 To 9
   ...
Next

For i = 0 To 9
   ...
Next i

Does putting "Next i" instead of just "Next" at the end make a difference?

--
Alex C. Barberi
Chief Executive Officer
VisionForce
http://www.visionforceweb.com

Author
22 Feb 2006 6:23 PM
Mattias Sjögren
microsoft.public.dotnet.languages.vb is a better group for VB.NET
syntax questions.


>Does putting "Next i" instead of just "Next" at the end make a difference?

Not to the compiled code. Some may argue that it affects the
readability of your source code.


Mattias

--
Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Author
22 Feb 2006 6:34 PM
Alex C. Barberi
> microsoft.public.dotnet.languages.vb is a better group for VB.NET
> syntax questions.
Oh okay, thanks.

> Not to the compiled code. Some may argue that it affects the
> readability of your source code.
Great, exactly what I need to know. Thanks for all your help.

--
Alex C. Barberi
Chief Executive Officer
VisionForce
http://www.visionforceweb.com



Show quote
"Mattias Sjögren" wrote:

> microsoft.public.dotnet.languages.vb is a better group for VB.NET
> syntax questions.
>
>
> >Does putting "Next i" instead of just "Next" at the end make a difference?
>
> Not to the compiled code. Some may argue that it affects the
> readability of your source code.
>
>
> Mattias
>
> --
> Mattias Sjögren [C# MVP]  mattias @ mvps.org
> http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
> Please reply only to the newsgroup.
>

AddThis Social Bookmark Button