How to compare two Dictionary<string,int> to find if any of the value has changed?
<p>I have two dictionary <code>personalizePatientChartDictionary</code> and <code>personalizePatientChartDictionaryOriginal</code>. Both have same key but value can be different. I want to find out if there is any difference in value for a key. I have come up with the following function. Is there any better way of doing this? I am using .NET 4.0.</p>

<pre><code>void CompareOriginalValues()
{
    foreach (KeyValuePair&lt;string, int&gt; Origkvp in personalizePatientChartDictionaryOriginal)
    {
        foreach (KeyValuePair&lt;string, int&gt; kvp in personalizePatientChartDictionary)
        {
            if ((Origkvp.Key == kvp.Key) &amp;&amp; (Origkvp.Value != kvp.Value))
            {
                hasDictionaryChanged = true;
                break;
            }
        }
        if (hasDictionaryChanged)
        {
            break;
        }
    }
}
</code></pre>
