Created
July 29, 2018 10:29
-
-
Save rexcfnghk/cd47d8152e6df68d8fcdf70c942718be to your computer and use it in GitHub Desktop.
This file contains hidden or 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
void Foo() | |
{ | |
var list = new[] { 1, 2, 3, 4, 5 }; | |
int i = 0; | |
while (i < list.Length) | |
{ | |
list[i] *= 2; | |
i++; | |
} | |
// i is still visible here and is equal to list.Length | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment