把字典按Key的字母顺序排序 IDictionary<string, string>

public static string SignTopRequest(IDictionary<string, string> parameters, string secret, bool qhs)
        {
            // 第一步:把字典按Key的字母顺序排序
            IDictionary<string, string> sortedParams = new SortedDictionary<string, string>(parameters);
            IEnumerator<KeyValuePair<string, string>> dem = sortedParams.GetEnumerator();

 

posted @ 2013-04-03 13:50  xust  阅读(778)  评论(0编辑  收藏  举报