In C# if an object in a list is added to another list, does changing the object in the second list change the same object in the first list?
问题 Say I have a list of Person objects ( List<Person> ) called persons , like this: class Person { public int PersonId { get; set; } // Unique ID for the person loaded from database public string Name { get; set; } } // In a different class public List<Person> Persons = new List<Person>(); // Person objects are subsequently added to the list and then I select some of the Person objects from the list, sort them by a property (e.g. by each person's unique ID PersonId ), and add these selected