如何使用 linq 根据一个人的钱对以下列表进行计数、分组和排序?
Person[] names = { new Person{ Name = "Harris", Money = 100 },
new Person{ Name = "David", Money = 100 },
new Person{Name = "Harris", Money = 150},
new Person{Name = "Mike", Money = 100},
new Person{Name = "Mike", Money = 30},
new Person{Name = "Mike", Money = 20} };
结果将返回:
Harris 250
Mike 150
David 100