title: Trying to use LINQ to check if a BitmapSource exists in a List<BitmapSource>
body: <p>I need to check if a <code>BitmapSource</code> already exists in a <code>List&lt;BitmapSource&gt;</code>, but I am not sure what exactly I should compare. The method that will be checking and adding the item to a list gets the <code>BitmapSource</code> as a parameter from a routed command from a WPF <code>UserControl</code></p>
  
  <p>I want to do something like this:</p>
  
  <pre><code>if(!selectedImages.Any(x =&gt; x.SomeBitmapSourceProperty == e.Parameter.SomeBitmapSourceProperty)
       selectedImages.Add(e.Parameter as BitmapSource)
  </code></pre>
  
  <p>What would I use to compare two <code>BitmapSource</code> and would I actually be able to access that property from <code>e.Parameter</code>?</p>