我试图做以下LINQ分组,它在调试器中工作(结果填充在GroupedOrders对象中。设计时间...当通过分组查询循环时找不到LINQ VB.NET变量
Name 'x' is not declared
Dim GroupedOrders = (From m In thisConsultant.orders _
Group m By Key = m.commCode Into Group _
Select commCode = Key, orders = Group)
For Each x In GroupedOrders
Next
Public Structure consultantDetail
Public orders As List(Of orderDetail)
End Structure
Public Structure orderDetail
Public transactionID As Integer
Public qualifyingVolume As Decimal
Public commissionableVolume As Decimal
Public sponsorID As Integer
Public orderDate As DateTime
Public commCode As String
Public commPercentage As Decimal
Public discountPercent As Decimal
End Structure
的编译标签那么此特定错误赢得让我建立这个项目。它无法识别每个循环中的X变量 – 2010-03-30 12:33:56
您可以粘贴一些代码吗? – 2010-03-30 13:05:23