Last active
August 29, 2015 14:20
-
-
Save emoacht/9c76f15454091f55a66c to your computer and use it in GitHub Desktop.
Scope of a local variable in loop (Case 4)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub LocalVariableCase4A() | |
For i = 0 To 2 | |
LocalVariableCase4B() | |
Next | |
'False | |
'False | |
'False | |
End Sub | |
Private Sub LocalVariableCase4B() | |
Dim value As Boolean | |
Console.WriteLine(value) 'No error in VB | |
value = True | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment