using System.Collections.Generic;
public int ID { get; set; }
public static void Main()
List<Person> peopleList1 = new List<Person>();
peopleList1.Add(new Person() { ID = 1 });
peopleList1.Add(new Person() { ID = 2 });
peopleList1.Add(new Person() { ID = 3 });
List<Person> peopleList2 = new List<Person>();
peopleList2.Add(new Person() { ID = 1 });
peopleList2.Add(new Person() { ID = 2 });
peopleList2.Add(new Person() { ID = 3 });
peopleList2.Add(new Person() { ID = 4 });
peopleList2.Add(new Person() { ID = 5 });
var personList = peopleList2.Where(p => !peopleList1.Any(s => s.ID==p.ID)).ToList();
var numbers = personList.Select(s=>s.ID).ToList();
foreach(var num in numbers){
private static void Print(List<Person> list)
foreach (var document in list)
Console.WriteLine(document.ID);
Console.WriteLine("=====================\n");