Это помогает?Customer
имеет одно свойство ID
типа int64
.
Dim foo As New Dictionary(Of Int64, Int64)
Dim bar As New Dictionary(Of Int64, Customer)
foo.Add(1, 5)
foo.Add(2, 99)
foo.Add(3, 222)
foo.Add(4, 333)
bar.Add(1, New Customer(5, "john"))
bar.Add(55, New Customer(323, "ringo"))
bar.Add(4, New Customer(333, "george"))
Dim common = From f In foo, b In bar _
Where f.Key = b.Key _
And f.Value = b.Value.ID _
Select b
For Each item As KeyValuePair(Of Int64, Customer) In common
Console.WriteLine(item.Key & " " & item.Value.ID & " " & item.Value.Name)
Next
....
Public Class Customer
Public ID As Int64
Public Name As String
End Class