C# Yield

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


Popular posts from this blog

DotNet CLI

Switch Expressions