title: Comparing object used as Key in Dictionary
body: <p>my class:</p>
  
  <pre><code>public class myClass
  {
      public int A { get; set; }
      public int B { get; set; }
      public int C { get; set; }
      public int D { get; set; }
  }
  </code></pre>
  
  <p>and main example:</p>
  
  <pre><code>Dictionary&lt;myClass, List&lt;string&gt;&gt; dict = new Dictionary&lt;myClass, List&lt;string&gt;&gt;();
  myClass first = new myClass();
  first.A = 2;
  first.B = 3;
  
  myClass second = new myClass();
  second.A = 2;
  second.B = 3;
  second.C = 5;
  second.D = 6;
  
  dict.Add(first, new List&lt;string&gt;());
  
  if (dict.ContainsKey(second))
  {
      //
      //should come here and update List&lt;string&gt; for first (and only in this example) key 
      //
  }
  else
  {
      //
      //if myFirst object has difference vlues of A or B properties
      //
      dict.Add(second, new List&lt;string&gt;());
  }
  </code></pre>
  
  <p>How to do this?</p>