title: Set multiple properties in a List<T> ForEach()?
body: <p>Given a class:</p>
  
  <pre><code>class foo
  {
      public string a = "";
      public int b = 0;
  }
  </code></pre>
  
  <p>Then a generic list of them:</p>
  
  <pre><code>var list = new List&lt;foo&gt;(new []{new foo(), new foo()});
  </code></pre>
  
  <p>If I am to assign <strong>multiple</strong> properties inside the following <code>List&lt;T&gt;</code> <code>ForEach()</code> method, is there a simpler way to do it that below? Hopefully I'm being a bit thick.</p>
  
  <pre><code>// one property - easy peasy
  list.ForEach(lambda =&gt; lambda.a="hello!");
  // multiple properties - hmm
  list.ForEach(lambda =&gt; new Action(delegate() { lambda.a = "hello!"; lambda.b = 99;}).Invoke());
  </code></pre>
  
  <p>Edit: Thought <code>ForEach()</code> was a LINQ extension method, when it's actually part of <code>List&lt;T&gt;</code> oops!</p>