title: How to omit a value in a select lambda?
body: <p>I want to make a simple CSV parser. It should go through a list of comma separated values and put them in a <code>IList&lt;int&gt;</code>. The values are expected to be integer numbers. In case a value is not parseable, I just want to omit it.</p>
  
  <p>This is the code I have so far:</p>
  
  <pre><code>csv.Split(',').Select(item =&gt;
  {
      int parsed;
      if (int.TryParse(item, out parsed))
      {
          return parsed;
      }
      continue; //is not allowed here
  }).ToList();
  </code></pre>
  
  <p>However, the use of <code>continue</code> is (of course) not allowed here. <strong>How to omit a value in my select implementation?</strong></p>
  
  <p>Note: Of course could I use a foreach or a LINQ expression, but I wonder how to do it with a lambda.</p>