Created
May 25, 2021 11:06
-
-
Save lgolubyev/474c86a4d97b33b4a3fd73d682244d51 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
using system; | |
using System.Collections.Generic; | |
IEnumerator<string> colors = new List<string> {"blue", "red", "green"}.GetEnumerator(); | |
foreach (var colors in colors) | |
{ | |
Console.WriteLine($"{color} is my favorite color"); | |
} | |
public static class Extensions | |
{ | |
public static IEnumerator<T> GetEnumerator<T>(this IEnumerator<T> enumerator) => enumerator; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment