Posted on

When building a method that returns IEnumerable, you can use the yield keyword to return results one at a time, rather than returning a full collection. This is useful if your collection would be very large, or if you want results as fast as you can rather than waiting.

View code on GitHub

Leave a Reply

Your email address will not be published. Required fields are marked *