I have two Generic Dictionaries.Both have same keys.But values can be different.I want to compare 2nd dictionary with 1st dictionary .If there are differences between values
You mentioned that both dictionaries have the same keys, so if this assumption is correct, you don't need anything fancy:
foreach (var key in d1.Keys) { if (!d1[key].Equals(d2[key])) { d3.Add(key, d2[key]); } }
Or am I misunderstanding your problem?