0
我有一個像列表對象的列表合併對象基於對象屬性
class Address{
public int HouseNo
public string Street
}
class Person
{
string Name;
public Address location
}
List<Person> list1 = new List<Person>
{
new Person("a", Address x),
new Person("b", Address y),
new Person("c", Address z),
new Person("a", Address a)
};
我想合併/列表1中基於同一Person.Name
這樣的成績相結合的物體包含
Person("a", [Address x,Address y])