title: C# Removing a List from a List
body: <p>Is there a convenient way to remove a nested list from another list if it meets certain requirements? For example, say we have a collection of stops, and we decide to call each collection of stops a route. Each route is in list from. Then we decide to put each route into a list as well.</p>
  
  <p>So now that we have a list of routes, someone decides that certain types of routes really shouldn't be included in the route list. How can I remove those routes? Here's some sample code: </p>
  
  <p>Example Class</p>
  
  <pre><code>public class Stops
  {
      public Stops(int _param1, string _param2)
      {
          param1 = _param1;
          param2 = _param2;
      }
  
      public int param1 { get; set; }
      public string param2 { get; set; }
  }
  </code></pre>
  
  <p>Create the Lists</p>
  
  <pre><code>List&lt;List&lt;Stops&gt;&gt; lstRoutes = new List&lt;List&lt;Stops&gt;&gt;();
  List&lt;Stops&gt; lstStops = new List&lt;Stops&gt;();
  List&lt;Stops&gt; lstMoreStops = new List&lt;Stops&gt;();
  
  // Create some stops
  for (int i = 0; i &lt; 5; i++)
  {
      lstStops.Add(new Stops(i, "some text"));
  }
  
  lstRoutes.Add(lstStops);
  
  // Create some more stops
  for (int i = 5; i &lt; 10; i++)
  {
      lstMoreStops.Add(new Stops(i, "some more text"));
  }
  
  lstRoutes.Add(lstMoreStops);
  </code></pre>
  
  <p>How can I remove any route from lstRoutes that has, say, any param1 value greater than 6? </p>