I have two classes that have two common attributes: Id and Information.
public class Foo { public Guid Id { get; set; } public string Information { get; set; } ... } public class Bar { public Guid Id { get; set; } public string Information { get; set; } ... }
Using LINQ, how can I take a populated list of Foo objects and a populated list of Bar objects:
var list1 = new List<Foo>(); var list2 = new List<Bar>();
and combine the identifier and information of each of them into one dictionary:
var finalList = new Dictionary<Guid, string>();
Thanks in advance.
source share