I found the default implemtation of ToString in the dictionary is not what I want. I would like to have {key=value, ***}.
{key=value, ***}
Any handy way to get it?
Try this extension method:
public static string ToDebugString (this IDictionary dictionary) { return "{" + string.Join(",", dictionary.Select(kv => kv.Key + "=" + kv.Value).ToArray()) + "}"; }