How do I insertsect two lists of KeyValuePairs based on their keys? I have tried:
List<KeyValuePair<string, string>> listA = new List<KeyValuePair<string, string>>();
List<KeyValuePair<string, string>> listB = new List<KeyValuePair<string, string>>();
...
var result = listA.Intersect(listB);
Which expectedly doesn't work. Do I need to write my own comparer based on the key or is there a easy way using LINQ/Lambda?
Thanks!