Re:How many keywords I can fit into a single C# expression?
by rejschaap on Thursday February 07, 2019 @03:20AM
(#19103829)
> As an example, a .Where(...) on a List<...> object is exactly what it claims to be: a linear pass through the list.
Yes, but it uses deferred execution, which means that it returns enough information to perform the filter, it doesn't really do much until you start to enumerate the list. If, for instance, you continue to do a Take(5) on the result, the filter is only applied until it finds 5 elements that satisfy the filter (or until there are no more elements).
Yes, but it uses deferred execution, which means that it returns enough information to perform the filter, it doesn't really do much until you start to enumerate the list. If, for instance, you continue to do a Take(5) on the result, the filter is only applied until it finds 5 elements that satisfy the filter (or until there are no more elements).