I have code like:
var result = from x in Values where x.Value > 5 select x;
Then, I want to check:
if(result.Count > 0) { ... }
else if(result.Count == 1) { ... }
else { throw new Exception(...); }
However, I get errors like:
error CS0019: Operator '==' cannot be applied to operands of type 'method group' and 'int'
Can I do this without writing a foreach over result?