Quantcast
Viewing latest article 1
Browse Latest Browse All 23

Answer by Alex for LINQ equivalent of foreach for IEnumerable

To stay fluent one can use such a trick:

GetItems()
    .Select(i => new Action(i.DoStuf)))
    .Aggregate((a, b) => a + b)
    .Invoke();

Viewing latest article 1
Browse Latest Browse All 23

Trending Articles