>>>First I'm creating a dictionary like this:
>>>
>>>
>>>Dictionary<int, bool> lRuleCheck = new Dictionary<int, bool> { };
>>>
>>>
>>>The dictionary is being populated with PK's and True/False. Then, I later query it like this:
>>>
>>>
>>>var trueCount = lRuleCheck.Select(x => x.Value == true).Count();
>>>var falseCount = lRuleCheck.Select(x => x.Value == false).Count();
>>>
>>>
>>>At the point this is run, there's only one item in the dictionary, with a 0/true, yet both trueCount and falseCount are both 1.
>>
>>Try:
var trueCount = lRuleCheck.Where(x => x.Value).Count();
>>var falseCount = lRuleCheck.Where(x => !x.Value).Count();
>
>
>That did it. Thanks!
What's the difference? Or lucky guess?