using System.Collections.Generic;
public string Name { get; set; }
public Test(string name) {
public static void Main()
List<Test> l1 = new List<Test>();
l1.Add(new Test("Peter")); l1.Add(new Test("Klaus"));
List<Test> l2 = new List<Test>();
l2.Add(new Test("Peter")); l2.Add(new Test("Franz"));
List<Test> l3 = new List<Test>();
l2.Add(new Test("Josef")); l2.Add(new Test("Fritz"));
Console.WriteLine("Do l1 and l2 have an element in common:");
l1.Exists(a => l2.Exists(b => a.Name == b.Name))
Console.WriteLine("Do l1 and l3 have an element in common:");
l1.Exists(a => l3.Exists(b => a.Name == b.Name))