title: How to return an object Type given 2 parameters in a dictionary C#
body: <p>I want to build a dictionary composed by 2 keys and 1 value. Is that possible?</p>
  
  <pre><code>Dictionary&lt;(key1, key2), Type&gt; dict = new Dictionary&lt;(key1, key2), Type&gt;();
  </code></pre>
  
  <p>Then I want to find in my dictionary by this 2 keys and get the Type. I tried that key1 and key2 were inside an object like this</p>
  
  <pre><code>Dictionary&lt;Object, Type&gt; dict = new Dictionary&lt;Object, Type&gt;();
  </code></pre>
  
  <p>Then I added into my dictionary an new instance object with the attributes like this </p>
  
  <pre><code>//myObject has many attributes that are empty and I just fill this 2 ones to build my dict
  Object myObject = new Object();
  myObject.Key1 = "A";
  myObject.Key2 = "B";
  dict.Add(myObject, (Type)objType);
  </code></pre>
  
  <p>But, the object that I want to find is loaded with data from DB and has probably many attributes filled. </p>
  
  <p>The thing is when I use the TryGetValue returns nothing, so I think it's because is looking by the same reference which is not the same.</p>
  
  <p>Well the question, how can I build my dictionary with 2 keys (STRING, STRING) and 1 return value (TYPE) in a easy way.</p>
  
  <p>Thanks</p>