【发布时间】:2018-07-25 07:08:44
【问题描述】:
Dim distinctJoints As IEnumerable
distinctJoints = From row In spotsTable.AsEnumerable()
Group row By Key = row("FUNCJOINTCODE") Into Group
Select Key, Group
_evaluatedJointsCount = (From row In spotsTable.AsEnumerable()
Group row By Key = row("FUNCJOINTCODE") Into Group
Select Key, Group).Count()
'Process each joint
For Each currentJoint In distinctJoints
Dim currentJointKey As String = currentJoint.Key
对于上面的代码currentJoint.Key 在选项严格打开后显示后期绑定错误。
你能帮我解决这个问题吗?
【问题讨论】:
-
不,它没有。您使用了错误的类型 - IEnumerable 与 IEnumerable
不同。在这种情况下,没有理由单独定义 distinctJoints,只需编写Dim DistinctJoins = From ...,类型推断将使用正确的类型