我試圖做以下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