Created
June 13, 2017 20:28
-
-
Save gustavodaquino/9732ca1ad53ccf2b86059770dcf8f32c to your computer and use it in GitHub Desktop.
Compiler-generated code for a foreach loop using the iterator pattern.
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
List<Person>.Enumerator e = people.GetEnumerator(); | |
try | |
{ | |
Person v; | |
while (e.MoveNext()) | |
v = e.Current; | |
} | |
finally | |
{ | |
System.IDisposable d = e as System.IDisposable; | |
if (d != null) d.Dispose(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment