title: Check if values of Dictionary contains an element with certain field value
body: <p>I have a Dictionary</p>
  
  <pre><code>private readonly Dictionary&lt;int, BinaryAssetExtensionDto&gt; _identityMap;
  </code></pre>
  
  <p>And I would like to do something like this:</p>
  
  <pre><code>if(_identityMap.Values.Contains(x =&gt; x.extension == extension))...
  </code></pre>
  
  <p>Is this possible because previous code doesn't work.</p>
  
  <p>Now I'm doing it like this:</p>
  
  <pre><code>var result = _identityMap.Values.ToList().Find(x =&gt; x.extension == extension);
  if (result != null) return result;
  </code></pre>