title: Casting linq query result to enum
body: <p>I have a list of similar object. The objects in this list all have a property named <code>Name</code> and an enum type which is named <code>Mk2Result</code> but are of enum type <code>Mk2TestResult</code>.</p>
  
  <p>Now inside a for loop I wind to see if the current itterator integer is exist in the list as a name of an object:</p>
  
  <pre><code>for(......
  {
  //    
      var query = 
          from pin in _pins 
          where pin.Name == i.ToString() 
          select pin.Mk2Result;
  
      Mk2TestResult result = (Mk2TestResult)query;
  
      //Do some more stuff
  }
  </code></pre>
  
  <p>But the compiler complains with the following message:</p>
  
  <pre><code>Cannot convert type 'System.Collections.Generic.IEnumerable&lt;DataModels.Mk2TestResult&gt;' to 'DataModels.Mk2TestResult'
  </code></pre>
  
  <p>How to correctly return the query result as the enum type?</p>