Skip to content

Instantly share code, notes, and snippets.

@Ershad95
Created January 28, 2023 04:54
Show Gist options
  • Save Ershad95/db78afb43958c37142dcce538e044358 to your computer and use it in GitHub Desktop.
Save Ershad95/db78afb43958c37142dcce538e044358 to your computer and use it in GitHub Desktop.
static async IAsyncEnumerable<int> RangeAsync(int start, int count)
{
for (int i = 0; i < count; i++)
{
await Task.Delay(i);
yield return start + i;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment