Mid LINQ

Find employees in both List A and List B?

Find employees in both List A and List B

var listA = employees.Take(3);

var listB = employees.Skip(2);

var common = listA.Select(e => e.Id)

.Intersect(listB.Select(e => e.Id));

Follow :

More from LINQ Tutorial

All questions for this course