I have 2 lists of objects, and I need to know if any property has changed. Here is what I have:
public class Person
{
public int PersonId { get; set; }
public string Name { get; set; }
public string Email { get; set; }
}
Then, I have 2 lists of Person.
var list1 = new List<Person>();
var list2 = new List<Person>();
I need to know if list1 and list2 contains some Person objects, make sure that the values of the properties are the same, comparing through the PersonId.