I need to select a number of values (into a List) from a Dictionary based on a subset of keys.
I\'m trying to do this in a single line of code using Linq but what I have
If you know that all the value that you want to select are in the dictionary, you can loop through the keys instead of looping through the dictionary:
List selectedValues = keysToSelect.Select(k => dictionary1[k]).ToList();