0

我在以下 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"' 部分是引发异常的部分,但鉴于所有字段都是文本,我不明白为什么会发生这种情况。有什么想法吗?谢谢!

4

1 回答 1

0

你有一个额外的+逗号。代替

+"This site has an incorrect billing PLI set up; " _

"This site has an incorrect billing PLI set up; " _
于 2013-09-26T19:15:31.897 回答