Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想看看有多少已经全额支付,全额支付有点,但是 Visual Studio 和 Linq 将其转换为布尔值?
除非我强制转换,否则下面的代码将不起作用,但我该如何转换呢?我尝试了多种方法。
int i = (from c in YSA.YSAs where c.YSA_PAID_FULL = true select c).Count();
你==不需要=
==
=
int i = (from c in YSA.YSAs where c.YSA_PAID_FULL == true select c).Count();
看起来你应该使用==运算符
where c.YSA_PAID_FULL == true
喜欢;