title: How to compare KeyValuePair in C#
body: <p>I have one Dictionary and one List.
  In List there is KeyValuePair and there is KeyValuePair in Dictionary. Is it possible to compare it?</p>
  
  <p>I want to get table of things where these elements are equal.
  My idea was something like it:</p>
  
  <pre><code>Class Fist
  {
  
  public List&lt;keyValuePair&lt;string, string&gt;&gt; List;
  }
  
  Class Second
  {
  public Dictionary&lt;int, keyValuePair&lt;string,string&gt;&gt; Dictionary;
  }
  </code></pre>
  
  <p>and :</p>
  
  <pre><code>First First;
  Second Second;
  </code></pre>
  
  <p>then I add some values using methods which aren't important here.</p>
  
  <p>finally I've tought about:</p>
  
  <pre><code>if((First.List.Keys &amp;&amp; First.List.Values) == (Second.Dictionary.Keys &amp;&amp; Second.Dictionary.Values)
  </code></pre>
  
  <p>but it doesn't work. Any help?</p>
  
  <p>[EDIT]</p>
  
  <p>My mistake, I forgot about most important thing.
  I want to return this "int" element from Dictionary -thx for it  Tim Schmelter</p>