title: Removing node from c# LinkedList
body: <p>I am trying to delete a node from a System.Collections.Generic.LinkedList, where T is an object with multiple properties. I would like to delete the node based on matching one of the properties, such as <b><i>T.paint.color = "blue"</i></b>. At first I tried:</p>
  
  <pre><code>foreach (Car carNode in carList)
  {
      if (carNode.paint.color == "blue")
      {
           carList.Remove(carNode);
      }
  }
  </code></pre>
  
  <p>Of course this fails with the "Collection was modified after the enumerator was instantiated" error. The example on MSDN is a simple array of strings and uses something like:</p>
  
  <pre><code>sentence.Remove("old");
  </code></pre>
  
  <p>My question is how (or if) I can use something like (using pseudo code):</p>
  
  <pre><code>carList.Remove(the node where carList.paint.color == "blue");
  </code></pre>
  
  <p>Thanks.</p>