I have a list with a boolean value as one of the properties. I need to check if every one of these is true. Now normally LINQ would give a nice clean answer here, but as I am using .NET 2.0 I can't use that.
If there a nicer way to do this or am I going to have to do a for each loop and break out on finding a false?
Edit:
Seems I could have been a bit clearer. I have an object in a list (eg List (Of MyObject)
). There is a boolean property on this object called Processed.
I need to check that all objects in the list are processed.
So in LINQ I'd do:
if (from o in list where o.processed = false select o).count = 0 then....