Skip to content

Instantly share code, notes, and snippets.

@JohnMGant
Last active July 17, 2020 21:48
Show Gist options
  • Select an option

  • Save JohnMGant/a730c6c28ccd0d247324750c2c911c85 to your computer and use it in GitHub Desktop.

Select an option

Save JohnMGant/a730c6c28ccd0d247324750c2c911c85 to your computer and use it in GitHub Desktop.
static void Main() {
foreach (var line in TellJokeAboutMice())
{
Console.WriteLine(line);
}
}
private static IEnumerable<string> TellJokeAboutMice()
{
yield return "MR MICE.";
yield return "MR NOT.";
yield return "OSMR! CM EDBD FEET?";
yield return "LIB! MR MICE!";
yield break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment