How to perform intersection of two collections?
How to perform intersection of two collections?
var intersect = list1.Intersect(list2);
foreach (var name in intersect)
Console.WriteLine(name); // Output: Bob
How to perform intersection of two collections?
var intersect = list1.Intersect(list2);
foreach (var name in intersect)
Console.WriteLine(name); // Output: Bob