Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm using this in a site but because there's no validation on the keys, I've been getting the dreaded error "An item with the same key has already been added."
Just add this to the KeyValueEditorValueConverter line 42
var uniqueValues = pairs.GroupBy(pair => pair.Key) .Select(group => group.First()) .ToDictionary(pair => pair.Key, pair => pair.Value); foreach (var pair in uniqueValues) { retval.Add(pair.Key, pair.Value); }
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Handle duplicate keys
I'm using this in a site but because there's no validation on the keys, I've been getting the dreaded error "An item with the same key has already been added."
Just add this to the KeyValueEditorValueConverter line 42
is working on a reply...