Skip to content

Instantly share code, notes, and snippets.

@masaab
Last active April 19, 2020 05:58
Show Gist options
  • Select an option

  • Save masaab/be1e4f30774eb59987d3d5de78da6d5e to your computer and use it in GitHub Desktop.

Select an option

Save masaab/be1e4f30774eb59987d3d5de78da6d5e to your computer and use it in GitHub Desktop.
serving bread the yemeni way
public async IAsyncEnumerable<int> GetBreadYemeniWayAsync(int numberOfBreads)
{
for (int i = 1; i <= numberOfBreads; i++)
{
Console.WriteLine($"Baking Yemeni Bread:{i}");
await Task.Delay(1000);
yield return i;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment