Reputation: 49
I'm trying to see how many have paid in full, the paid in full is a bit, but Visual Studio and Linq converts it to a bool?
The code below wont work unless I cast it but how do I cast it? I have tried multiple ways.
int i = (from c in YSA.YSAs
where c.YSA_PAID_FULL = true
select c).Count();
Upvotes: 2
Views: 63
Reputation: 98868
Looks like you should use ==
operator
where c.YSA_PAID_FULL == true
Like;
int i = (from c in YSA.YSAs
where c.YSA_PAID_FULL == true
select c).Count();
Upvotes: 1
Reputation: 223422
You need ==
not =
int i = (from c in YSA.YSAs
where c.YSA_PAID_FULL == true
select c).Count();
Upvotes: 2