title: Find an item from a list based on an ID
body: <p>I have this class</p>
  
  <pre><code>public class item
  {
          public int itemID { get; set; }
          public int itemValue { get; set; }
  }
  </code></pre>
  
  <p>and I have a variable </p>
  
  <pre><code>public List&lt;item&gt; itemList;
  </code></pre>
  
  <p>I am trying to search and find an item in itemList that has itemID=i using lambda.
  Normally, the function without lamda is as follow:</p>
  
  <pre><code>public item FindItem(int i)
  {
  foreach (var t in itemList)
  {
    if (t.itemID==i)
      return t;
  }
  return null;
  }
  </code></pre>
  
  <p>and I tried to replace it with this lambda</p>
  
  <pre><code>item Item = itemList.Where(x=&gt;x.itemID==i).Select(x=&gt;x);
  </code></pre>
  
  <p>I got an error saying:</p>
  
  <pre><code>Error   1 Cannot implicitly convert type 'System.Collections.Generic.IEnumerable&lt;item&gt;' to 'item'. An explicit conversion exists (are you missing a cast?)
  </code></pre>
  
  <p>How should I correct this? I am still learning lambda, Linq</p>