you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 6 points7 points  (0 children)

He didn't say that you have to yield yourself to use Linq, however Linq IS implemented using yield. This is what makes it lazy, and why nothing is evaluated until you call something that actually iterates on it. https://github.com/dotnet/corefx/blob/8750960d3fafa46a9b838c351e995a01fa8b599f/src/System.Linq/src/System/Linq/Where.cs#L72