Strange behavior of the except-function of a SortedDictionary
<p>I'm trying to utilize the Except-Function of a SortedDicationary but I'm running crazy as it does not behave as I would have expected. The Excpet function works as long as the entries of the dictionary are of a simple data type. However, I'd like to store objects in the dictionay.</p>

<p>Here is my sample:</p>

<pre><code> using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;


namespace DictionaryTest
{
    class Program
    {
        static void Main(string[] args)
        {

            SortedDictionary&lt;string, Object&gt; objects = new SortedDictionary&lt;string, Object&gt;();
            SortedDictionary&lt;string, Object&gt; objects2 = new SortedDictionary&lt;string, Object&gt;();




            objects.Add("A", new Object());
            objects.Add("B", new Object());
            objects2.Add("A", new Object());

            IEnumerable&lt;KeyValuePair&lt;string, Object&gt;&gt; objects_a_only = objects.Except(objects2);

            foreach (KeyValuePair&lt;string, Object&gt; o in objects_a_only)
            {
                Console.WriteLine(o.Key);


            }
            Console.WriteLine("Program finished. Press any key to continue");
            Console.ReadKey();


        }
    }
}
</code></pre>

<p>I was expecting to only get 'A' as output but it actually returns 'A' and 'B'. </p>

<p>As far as I understood it matching only takes place based on the Key of each entry. So I do not see any reason to work with a customized compare-class. </p>

<p>Any ideas on this?</p>
