title: AddRange/concat functionality inside a lambda Select expression
body: <pre><code>class Foo
  {
      int PrimaryItem;
      bool HasOtherItems;
      IEnumerable&lt;int&gt; OtherItems;
  }
  
  List&lt;Foo&gt; fooList;
  </code></pre>
  
  <p>How do I get a list of all item ids referenced inside <code>fooList</code>?</p>
  
  <pre><code>var items = fooList
               .Select(
                /*
                  f =&gt; f.PrimaryItem;
                  if (f.HasOtherItems)
                      AddRange(f =&gt; f.OtherItems)
                */  
                ).Distinct();
  </code></pre>