I have this list: List<bool> values = new List<bool>();
Filled out:
True,True,False,True,False,False,True
When I do this:
int amountTrue = values.Count(v => true);
it returns 7. This is just the number of values in the List. I think it checks to see if a value exists, but that is not what I want.
How to get the number of Truevalues in a List using Countor any other chaining method? I know that I can go through it, but I think it can be done easier.
source
share