Mid LINQ

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

More from LINQ Tutorial

All questions for this course