Public Class BlockScope
Public Shared Sub Main()
For outerLoop As Integer = 0 to 10000
For innerLoop As Integer = 0 to 10
Dim blockVar As Integer
blockVar += 1
If blockVar Mod 1000 = 0 Then
Console.WriteLine(blockVar)
End If
Next
Next
End Sub
End Class
Public Shared Sub Main()
For outerLoop As Integer = 0 to 10000
For innerLoop As Integer = 0 to 10
Dim blockVar As Integer
blockVar += 1
If blockVar Mod 1000 = 0 Then
Console.WriteLine(blockVar)
End If
Next
Next
End Sub
End Class
No comments:
Post a Comment