我在以下 Linq 查询中收到“从字符串转换为类型“双”错误:
Dim query = From Corrections In Test _
Where Not Corrections.Expected_Bill = Corrections.Bill _
Select Corrections.Account, _
Corrections.Site, _
Action = If(Corrections.Bill = "No billing PLI", _
+"This site has no billing PLI set up; " _
+ "please add " + Corrections.Expected_Bill, _
+"This site has an incorrect billing PLI set up; " _
+ "please remove " + Corrections.Bill + " and " _
+ "add " + Corrections.Expected_Bill)
看起来查询的 'If(Corrections.Bill = "No billing PLI"' 部分是引发异常的部分,但鉴于所有字段都是文本,我不明白为什么会发生这种情况。有什么想法吗?谢谢!