C# 3.5 Merge 2 lists of 2 different types
- by Ehsan
I have 2 generic Lists  List<type1> L1 ,  List<type2> L2 in C# 3.5
Problem: type1 has an attribute called "key1" and type2 has an attribute called "key2"
How to merge L1 and L2 on key1 = key2.
Both lists are unsorted  but I'm welcome to any ideas on how to sort the lists based on the attribute.
I'd like to be able to merge the two lists on a key. I know it's not a dictionary and it would've been nice if it was but there is a very specific reason why they are lists which I will not get in to because that is irrelevant.