I need to iterate over a List of objects, doing something only for the objects that have a boolean property set to true. I\'m debating between this code
for
I prefer this:
theList.Where(itm => itm.Condition).ToList().ForEach(itmFE => { itmFe.DoSomething(); });