title: How exactly to use array.where?
body: <p>I'm not sure if I got the right idea of how <strong>array.where()</strong> works.
  I've got an array filled with Spectrum.cs objects. each spectrum contains a filename-property.</p>
  
  <p>mySpectrum.filename; //String</p>
  
  <p>Now I have a stringvalue that I want to compare with each object in the array to find out, whether it has the same filename. As I got it it should work like this:</p>
  
  <pre><code>Spectrum bgSpec = new Spectrum(); //Has a filename
  Spectrum[] currentSpectra;  //Array filled with Spectra
  
  //Somehow this doesn't seem to work. Propably due to the returnvalue for where() which seems //to be IEnumerable.
  Spectrum tempSpectrum = currentSpectra.Where&lt;Spectrum&gt;(c =&gt; c.filename == bgSpec);
  </code></pre>
  
  <p>I propably got everything wrong and would be very grateful if somebody could point out what it is or how to do it right.</p>
  
  <p>Thanks in advance,
  BC++</p>