我的字典对象中有以下数据。
List<KeyValuePair<String, Component>> lstCountry = new List<KeyValuePair<string, Component>>();
//Sample data in above dictionary object
ASIA, Component object(India)
ASIA, Component object(China)
ASIA, Component object(Sri Lanka)
ASIA, Component object(Bangladesh)
..
..
..
EUROPE, Component object(United Kingdom)
EUROPE, Component object(Germany)
EUROPE, Component object(France)
..
..
现在我想将这些值添加到另一个主国家字典中,该字典将包含以下示例数据:
Dictionary<String, List<Component>> dicCountries = new Dictionary<string, List<Component>>();
//ASIA, List<Component> Object of all the ASIA countries
//AFRICA, List<Component> Object of all the AFRICA countries
//EUROPE, List<Component> Object of all the EUROPE countries
...
...
请建议是否可以使用 LINQ 或我们可以通过简单的 C# 编码来实现。