利用linq排序Dictionary

来源:互联网 发布:httppost json 编辑:程序博客网 时间:2024/05/16 18:07

   //利用linq排序Dictionary

       Dictionary<string,GColor> m_colorValueList= new Dictionary<string, GColor>();
       m_colorValueList = (from entry in m_colorValueList orderby entry.Key ascending select entry).ToDictionary(pair => pair.Key, pair => pair.Value);

原创粉丝点击