title: Finding an object in a list, remove and return it
body: <blockquote>
  <p><strong>Possible Duplicate:</strong><br />
  <a href="https://stackoverflow.com/questions/11856853/c-how-do-i-remove-an-item-inside-ienumerable">c#: how do I remove an Item inside IEnumerable</a></p>
  </blockquote>
  
  <p>I have an Inumerable of Objects <code>foo</code>.</p>
  <pre><code> public IEnumerable&lt;foo&gt; listOfFoo{ get; set; }
  </code></pre>
  <p>Foo has Id and name lets say.</p>
  <p>I want to pass an ID to a method and the method should remove the object with that ID from the  IEnumerable and return it.</p>
  <p>Whats the best way of doing it?</p>