Say I have 2 dictionaries:
var dict1 = new Dictionary<string, int> {
{ "key1", 1 },
{ "key2", 2 },
};
var dict2 = new Dictionary<string, int> {
{ "key2", -3 },
{ "key3", -4 },
};
Is there a simple way to "add" them? The result would be:
var dict3 = new Dictionary<string, int> {
{ "key1", 1 },
{ "key2", -1 },
{ "key3", -4 },
};
Keys are merged and values are summed up by key