我有N个"人物"清单.人们有2个属性:Id
和Name
.我想找到所有N个列表中包含的人员.我只想匹配Id.
以下是我的出发点:
Listresult = new List (); //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 list in peoplesList.Skip(1)) { //Do I even need this? } }
我被困在试图把头包裹在中间部分.我只想要每个列表中的那些peoplesList.Skip(1)
.