is it possible to substitute a foreach loop with a lambda expression in LINQ (.Select))?
foreach
.Select)
List l = {1, 2, 3, 4, 5}; forea
For any IEnumerable, you can do:
IEnumerable
items.Any(item => { Console.WriteLine(item); return false; }
But this would be utterly wrong! It's like using a shoe to hammer the nail. Semantically, it does not make sense.