把字典按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();