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

Answer by Nenad for LINQ equivalent of foreach for IEnumerable

$
0
0

Many people mentioned it, but I had to write it down. Isn't this most clear/most readable?

IEnumerable<Item> items = GetItems();
foreach (var item in items) item.DoStuff();

Short and simple(st).


Viewing all articles
Browse latest Browse all 23

Trending Articles



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