Created
August 14, 2014 19:22
-
-
Save jehugaleahsa/e2441ebcc3cda016b3a2 to your computer and use it in GitHub Desktop.
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
foreach (int i in items) | |
{ | |
Console.Out.WriteLine(i); | |
} | |
IEnumerator enumerator = ((IEnumerable)items).GetEnumerator(); | |
try | |
{ | |
int i; | |
while (enumerator.MoveNext()) | |
{ | |
i = (int)enumerator.Current; | |
Console.Out.WriteLine(i); | |
} | |
} | |
finally | |
{ | |
IDisposable disposable = item as IDisposable; | |
if (disposable != null) | |
{ | |
disposable.Dispose(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment