title: returning a list<SomeType> from list<AnotherType>
body: <p>I am trying to simplify this question, so bear with me.  I know about using interfaces, but for what I am specifically in the middle of, I don't quite know how to pull it off.  This is NOT a sql database, I could do that with my eyes closed and asleep.</p>
  
  <p>I have a list of one type of things which are overall generic, but within this list are some child elements that are of another type.  For example, Cars... and within each car are other things such as a style, etc. such as Sedan, Coupe, Convertible, etc.  There can be many other "things", but keeping it simple I have it as a list of objects, so I dont think I can look at an interface option on it.</p>
  
  <pre><code>public class Cars
  {
     public List&lt;object&gt; otherThingsAboutCar;
  }
  
  
  List&lt;Cars&gt; allCars = GetAListOfCars();
  </code></pre>
  
  <p>So, within this finite list of cars, I only want convertibles.</p>
  
  <pre><code>List&lt;Convertibles&gt; justConvs = HowToGetFrom "allCars".
  </code></pre>
  
  <p>Although I tried to simplify it for mental understanding purposes, the indicator that a car is a convertible is actually a child object within the cars class.  So its almost like I need to do something like...</p>
  
  <pre><code>foreach( Cars c in allCars )
  {
     if ( c.otherThingsAboutCar is a convertible )
        add this "c" to the List&lt;Convertibles&gt;
  }
  </code></pre>
  
  <p>So, although the car is one type, I need to look INSIDE the car for another specific element, and if so, only return those.  I would prefer an option like an IEnumerable to yield a return value if it qualifies, or a function that only returns a list of a type provided.  So in this case, I know the type of child component is Convertible, but there could be others, so I can't be fixed into a function returning just Convertibles.  I looked into generics and understand them to a single level, but if within that level, I want the child level to be another, how would I go about it.</p>
  
  <p>Hopefully explained enough, and here are some samples</p>
  
  <pre><code>Car1
     otherThingsAboutCar
        Sedan
        6-Cyl
        Leather
  
  Car2
     otherThingsAboutCar
        Convertible
        8-Cyl
        Leather
  
  Car3
     otherThingsAboutCar
        Convertible
        6-Cyl
        Leather
  
  Car3
     otherThingsAboutCar
        Coupe  
        6-Cyl
        Cloth
  </code></pre>
  
  <p>In this case, my outer cars list has 4 entries.  I want an array (or similar Enumerable/List/) that only includes the two convertibles.  As noted, I might also start with the same list and say I wanted only those with Leather, or 8-cyl engines, hence my thought of generics, but can't wrap my head around it.</p>