title: Removing item from list with RemoveAll
body: <p>I'm trying to use a lambda expression to remove a certain object from a list, based on a value within that object. Here is my lambda:</p>
  
  <pre><code>ChartAttributes.ToList().RemoveAll(a =&gt; a.AttributeValue.Contains("PILOT"));
  </code></pre>
  
  <p>Here is the ChartAttributes list</p>
  
  <pre><code>IList&lt;IChartAttribute&gt; ChartAttributes 
  </code></pre>
  
  <p>Here is the object ChartAttribute contained within the above list</p>
  
  <pre><code>    public virtual string AttributeKey { get; set; }       
      public virtual string AttributeValue { get; set; }        
      public virtual int ChartAttributeId { get; set; }        
      public virtual int ChartSpecificationId { get; set; }
  </code></pre>
  
  <p>There is a chart attribute with its AttributeKey set to "PILOT". But this never gets removed. What am I doing wrong?</p>
  
  <p>Thanks</p>