title: Using LINQ to find item in a List but get "Value cannot be null. Parameter name: source"
body: <p>When using LINQ to get data from a list I encounter this error. How can this be fixed?</p>
  
  <blockquote>
    <p>Value cannot be null. Parameter name: source</p>
  </blockquote>
  
  <pre><code>var nCounts = from sale in sal
                select new
                {
                    SaleID = sale.OrderID,
                    LineItem = from sli in sale.LineItems
                               group sli by sli.Item into ItemGroup
                               select new
                               {
                                   Item = ItemGroup.Key,
                                   Weeks = ItemGroup.Select(s =&gt; s.Week)
                               }
                };
  
  foreach (var item in nCounts)
  {
      foreach (var itmss in item.LineItem)
      {
          // MessageBox.Show(itmss.Item.Name);
          itemsal.Add(new Roundsman.BAL.WeeklyStockList(itmss.Item.Name.ToString(),
                      itmss.Item.Code.ToString(),
                      itmss.Item.Description.ToString(),
                      Convert.ToInt32(itmss.Item.Quantity), 2, 2, 2, 2, 2, 2, 2, 2, 2));
      }                      
  }
  </code></pre>
  
  <p>Error which i got after execution my LINQ I got that type of result (one line, orginally):</p>
  
  <blockquote>
    <p>System.Linq.Enumerable.WhereSelectListIterator&lt;Roundsman.BAL.Sale, 
        &lt;>f__AnonymousType1&lt;int,System.Collections.Generic.IEnumerable 
        &lt;&lt;>f__AnonymousType0&lt;Roundsman.BAL.Items.Item,System.Collections.Generic.IEnumerable 
        &lt;Roundsman.BAL.WeeklyRecord>>>>>
    </p>
  </blockquote>