title: Cannot assign void to an implicitly-typed local variable
body: <pre><code>var query = rep.GetIp()  // in this line i have the error
             .Where(x =&gt; x.CITY == CITY)
             .GroupBy(y =&gt; o.Fam)
             .Select(z =&gt; new IpDTO
                          {
                              IId = z.Key.Id,
                              IP = z.Select(x =&gt; x.IP).Distinct()
                          })
             .ToList().ForEach(IpObj =&gt; IpObj.IP.ToList().ForEach(ip =&gt; PAINTIP(ip)));
  </code></pre>
  
  <p>When I run this code I have the error:</p>
  
  <blockquote>
    <p>Cannot assign void to an implicitly-typed local variable</p>
  </blockquote>
  
  <p>I googled and found that it is a type issue because <code>foreach</code> is not a LINQ function? I cannot understand where the <code>void</code> is!</p>