Mon*_*RPG 0 c# sorting list c#-4.0
这是我的清单
List<KeyValuePair<string, int>> lstRodsMonsterPool = new List<KeyValuePair<string, int>>();
Run Code Online (Sandbox Code Playgroud)
现在我想尝试这样排序,但它给出了错误
lstRodsMonsterPool = (from entry in lstRodsMonsterPool
orderby entry.Value ascending
select entry)
.ToList<new KeyValuePair<string,int>(pair => pair.Key, pair => pair.Value)>;
Run Code Online (Sandbox Code Playgroud)
C#4.0
谢谢