IDictionary to string
问题 I have created an IDictionary extension to write IDictionary Exception.Data values to a string. The extension code: public static class DictionaryExtension { public static string ToString<TKey, TValue>(this IDictionary<TKey, TValue> source, string keyValueSeparator, string sequenceSeparator) { if (source == null) throw new ArgumentException("Parameter source can not be null."); return source.Aggregate(new StringBuilder(), (sb, x) => sb.Append(x.Key + keyValueSeparator + x.Value +