"Simple Async Enumerable Example"

var delayedSequence = new DelayedSequence(5, TimeSpan.FromSeconds(1d)); // Sequence of 1 to 5 with one second delay between each iteration

await foreach (var i in delayedSequence) {
	Console.WriteLine(i);
}


Code snippet taken from "Two Decades of C#: A Reference - C# 8".