tag:blogger.com,1999:blog-5374017.post111334161050373708..comments2023-12-22T08:02:00.933-08:00Comments on Rom's Rants: Visual Basic .NET Gotcha #1Michael Russellhttp://www.blogger.com/profile/14404101180817070293noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-5374017.post-1113396349694906012005-04-13T05:45:00.000-07:002005-04-13T05:45:00.000-07:00Michael,IIRC, your first example does exactly what...Michael,<BR/><BR/>IIRC, your first example does exactly what the language specification says it is supposed to do. The only variable that is scoped within the For...Next loop is i. Any variable declarations within a looping structure are pulled out of the loop and declared before the loop; just what the compiler did in your first example. It is bad code to declare variables within a looping structure that the compiler "fixes" for you.Anonymousnoreply@blogger.com