B
bpsdgnews
Hi,
I'm just starting with linq.
I can get data from collections in simple queries, but with a join I'm
still struggling.
See the code below.
I know for sure that in the Laps collection there are Laps with an
index equal to the FirstLapIndexes in the Runs collection. Still, the
result wil be a list with zero items.
Something I did wrong?
Dim Lijst = From Lap In m_gps.Laps _
Join Run In m_gps.Runs On Lap.Index Equals
Run.FirstlapIndex _
Select Lap.StartTime
MsgBox(m_gps.Runs.Count) 'Results in 26
MsgBox(m_gps.Laps.Count) 'Results in 142
MsgBox(Lijst.Count) 'Results in 0
I'm just starting with linq.
I can get data from collections in simple queries, but with a join I'm
still struggling.
See the code below.
I know for sure that in the Laps collection there are Laps with an
index equal to the FirstLapIndexes in the Runs collection. Still, the
result wil be a list with zero items.
Something I did wrong?
Dim Lijst = From Lap In m_gps.Laps _
Join Run In m_gps.Runs On Lap.Index Equals
Run.FirstlapIndex _
Select Lap.StartTime
MsgBox(m_gps.Runs.Count) 'Results in 26
MsgBox(m_gps.Laps.Count) 'Results in 142
MsgBox(Lijst.Count) 'Results in 0