title: Can an Action/delegate change it's arguments value?
body: <p>I ran into what was to me an unexpected result when testing a simple <code>ForEach</code> extension method.</p>
  
  <p><code>ForEach</code> method</p>
  
  <pre><code>public static void ForEach&lt;T&gt;(this IEnumerable&lt;T&gt; list, Action&lt;T&gt; action)
  {
      if (action == null) throw new ArgumentNullException("action");
  
      foreach (T element in list)
      {
          action(element);
      }
  }
  </code></pre>
  
  <p><code>Test</code> method</p>
  
  <pre><code>[TestMethod]
  public void BasicForEachTest()
  {
      int[] numbers = new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  
      numbers.ForEach(num =&gt;
      {
          num = 0;
      });
  
      Assert.AreEqual(0, numbers.Sum());
  }
  </code></pre>
  
  <p>Why would <code>numbers.Sum()</code> be equal to 55 and not 0?</p>