我一直得到这个异常“从对象到布尔值的隐式转换”,对于下面的表达式,我该如何摆脱它?
Dim objRows As IEnumerable(Of DataRow) = (From myRow As DataRow In objDS.Tables(0).AsEnumerable Where myRow.Item(PERSON_ID_LIST) = personid).Cast(of DataRow)
答案 0 :(得分:2)
尝试
Dim objRows As IEnumerable(Of DataRow) =
From myRow As DataRow In objDS.Tables(0).AsEnumerable()
Where myRow.Field(Of Int32)("PERSON_ID_LIST") = personid
否则你必须告诉我们PERSON_ID_LIST
是什么。