J
John
Is it possible to pass a LINQ query result to a Sub and not lose
Intellisense to the Fields returned.
Example:
Public Sub DoPriceListQuery()
Dim dbCus As New DataAPDataContext
Dim Price = (From c In dbCus.tblPriceLists _
Where c.Disabled = False _
And c.OwnerID = 1 _
Select c).ToArray
'have intellisense to fields returned in query
EditWeb(Price)
dbCus.SubmitChanges()
End Sub
Private Sub EditWeb(ByRef Price As Array)
For Each p in Price
With p
'lose Intellisense here but code works
End With
Next
End Sub
Intellisense to the Fields returned.
Example:
Public Sub DoPriceListQuery()
Dim dbCus As New DataAPDataContext
Dim Price = (From c In dbCus.tblPriceLists _
Where c.Disabled = False _
And c.OwnerID = 1 _
Select c).ToArray
'have intellisense to fields returned in query
EditWeb(Price)
dbCus.SubmitChanges()
End Sub
Private Sub EditWeb(ByRef Price As Array)
For Each p in Price
With p
'lose Intellisense here but code works
End With
Next
End Sub