Quantcast
Channel: LINQ equivalent of foreach for IEnumerable - Stack Overflow
Viewing all articles
Browse latest Browse all 23

LINQ equivalent of foreach for IEnumerable

$
0
0

I'd like to do the equivalent of the following in LINQ, but I can't figure out how:

IEnumerable<Item> items = GetItems();
items.ForEach(i => i.DoStuff());

What is the real syntax?


Viewing all articles
Browse latest Browse all 23

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>