我有一个LINQ代码来从数据表中提取值。
Dim dWYLDs = (From myrow In oSubData
Where mySubbasins.Contains(myrow("Subbasin"))
Group By xs = Val(myrow("X"))
Into myTotal = Sum(Val(myrow("WYLD")))).ToArray
我希望获得一系列 WYLD (为双倍)。相反,检查行
(using .GetType method
),我有......
VB$AnonymousType_1`2[System.Double,System.Double]
如何将其转换为数组?我的语法有问题吗?
答案 0 :(得分:0)
我不太确定如何使用您拥有的Into子句获得所需内容,但有些内容如下: -
Dim dWYLDs = (From myrow In oSubData
Where mySubbasins.Contains(myrow("Subbasin"))
Group By xs = Val(myrow("X"))
Select CType (Sum(Val(myrow("WYLD"))), Double)).ToArray
可能至少提供一个起点。