Philippe Renaud
asked on
Error Type Expected on LINQ Query
Hello EE,
Im trying to do this linq query :
it does not stops while running my software, but if I place a breakpoint, and I try to see whats inside "qx", it says : Error Type expected"
the goal is to return 3 variables, (Row, myKey, myValue), thats why I cannot do .ToDictionnary() or .ToList() I thought I needed to do Select New With since I have more than 2 varaibles
also I wanted to OrderBy in my LINQ
do you see any problem looking at it ?
Im trying to do this linq query :
Dim qx = (From m In MyItems
Where arrString.All(Function(v) m.Value.Contains(v))
Let row = rowID
Let myKey = m.Key
Let myValue = m.Value
).OrderBy(Function(n) n.myKey) _
.Select(Function(t) New With {t.row, t.myKey, t.myValue})
it does not stops while running my software, but if I place a breakpoint, and I try to see whats inside "qx", it says : Error Type expected"
the goal is to return 3 variables, (Row, myKey, myValue), thats why I cannot do .ToDictionnary() or .ToList() I thought I needed to do Select New With since I have more than 2 varaibles
also I wanted to OrderBy in my LINQ
do you see any problem looking at it ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
this seems to work :
Open in new window