title: How can I iterate over a collection and change values with LINQ extension methods?
body: <p>Lets say I have a collection of Messages which has the properties "UserID" (int) and "Unread" (bool).</p>
  
  <p>How can I use LINQ extension methods to set Unread = false, for any Message in the collection in whose UserID = 5?</p>
  
  <p>So, I know I can do something like:</p>
  
  <pre><code>messages.Any(m =&gt; m.UserID == 5);
  </code></pre>
  
  <p>But, how do I set the Unread property of each of those with an extension method as well?</p>
  
  <p>Note: I know I should not do this in production code.  I'm simply trying to learn some more LINQ-fu.</p>