Thursday 13 December 2012

How to fix error: is not a member of 'String'. LINQ

View on YouTube
Replace:
     Dim inv = dsInventory.Tables("Something").AsEnumerable()
                Dim Inventory = From h In inv _
                                Group h By GroupName = h.Field(Of String)("Group") _
                                    Into Group _
                                    Select GroupName
                curLine = 2
                For Each sku In Inventory
                      osheet.Range("A" & curLine).Value = sku.GroupName
                Next
With

     Dim inv = dsInventory.Tables("Something").AsEnumerable()
                Dim Inventory = From h In inv _
                                Group h By GroupName = h.Field(Of String)("Group") _
                                    Into Group _
                                    Select GroupName
                curLine = 2
                For Each sku In Inventory
                      osheet.Range("A" & curLine).Value = sku
                Next

No comments:

Post a Comment