Removing duplicates in Dictionary Key
<p>I have the below dictionary:</p>

<pre><code>Dictionary&lt;string, string&gt; test = new Dictionary&lt;string, string&gt;();
test.Add("1|1", "blue");
test.Add("1|2", "Nice");
test.Add("1|3", "Jaish");
test.Add("2|2", "Muna");
test.Add("3|1", "haha");
test.Add("3|2", "green");
test.Add("4|1", "red");
Dictionary&lt;string, string&gt; test2 = new Dictionary&lt;string, string&gt;();
foreach (KeyValuePair&lt;string, string&gt; entry in test)
{
    if (!test2.ContainsValue(entry.Key))
        test2.Add(entry.Key, entry.Key);
}
</code></pre>

<p>I want to remove the below duplicate values:</p>

<pre><code>test.Add("1|2", "Nice");
test.Add("1|3", "Jaish");
test.Add("3|2", "green")
</code></pre>

<p>So after removing the duplicates the <code>Dictionary</code>'s key count should be 4.</p>
