假设一个对象,例如:
class A {
string Country;
string Region;
}
IEnumerable<A>
比如:
"Denmark", "Arhus"
"Denmark", "Bornholm"
"Denmark", "Frederiksborg"
"Denmark", "Fyn"
"Denmark", "Copenhagen"
"Denmark", "Nordjylland"
"France", "Alsace"
"France", "Aquitaine"
"France", "Auvergne"
"France", "Basse-Normandie"
"France", "Bourgogne"
"France", "Bretagne"
"France", "Centre"
"France", "Champagne-Ardenne"
"France", "Corse"
etc...
我如何获得一个IDictionary<string, IEnumerable<string>> res
with Linq whereres['Country']
将返回一个IEnumerable<string>
相应区域?