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?
Another solution:
var dic = new Dictionary() { {"A", 100.0 }, {"B", 200.0 }, {"C", 50.0 } }; string text = dic.Select(kvp => kvp.ToString()).Aggregate((a, b) => a + ", " + b);
Value of text: [A, 100], [B, 200], [C, 50]
[A, 100], [B, 200], [C, 50]