public class ConsolidatedChild
{
public string School { get; set; }
public string Friend { get; set; }
public string FavoriteColor { get; set; }
public List<Child> Children { get; set; }
}
public class Child
{
public string School { get; set; }
public string Name { get; set; }
public string Address { get; set; }
public string Friend { get; set; }
public string Mother { get; set; }
public string FavoriteColor { get; set; }
}
鉴于上面的两个类,我想使用LINQ从List创建一个List,按School,Friend和FavoriteColor属性分组。LINQ可以实现吗?
请忽略属性,代码编写只是为了帮助解决问题。
慕斯709654
相关分类