I have N People lists. People have 2 properties: Id and Name . I want to find people who are in all lists of N. I only want to combine the identifier.
Below is my starting point:
List<People> result = new List<People>(); //I think I only need to find items in the first list that are in the others foreach (People person in peoplesList.First()) { //then this is the start of iterating through the other full lists foreach (List<People> list in peoplesList.Skip(1)) { //Do I even need this? } }
I'm stuck trying to wrap my head around the middle part. I only need those that are on each list from peoplesList.Skip(1) .
user2761580
source share