I am trying to combine two collections of the Dictionary together based on the overall meaning of the search.
var idList = new Dictionary<int, int>(); idList.Add(1, 1); idList.Add(3, 3); idList.Add(5, 5); var lookupList = new Dictionary<int, int>(); lookupList.Add(1, 1000); lookupList.Add(2, 1001); lookupList.Add(3, 1002); lookupList.Add(4, 1003); lookupList.Add(5, 1004); lookupList.Add(6, 1005); lookupList.Add(7, 1006);
The above Linq statement is just an example and does not compile. For each entry in idList, pull the value from lookupList based on the corresponding keys.
The result should be a list of values ββfrom lookupList (1000, 1002, 1004).
Easiest way to do this with Linq?
source share