title: Why are assignment operators (=) invalid in a foreach loop?
body: <p>Why are assignment operators (=) invalid in a <code>foreach</code> loop?  I'm using C#, but I would assume that the argument is the same for other languages that support <code>foreach</code> (e.g. PHP).  For example, if I do something like this:</p>
  
  <pre><code>string[] sArray = new string[5];
  
  foreach (string item in sArray)
  {
     item = "Some assignment.\r\n";
  }
  </code></pre>
  
  <p>I get an error, "Cannot assign to 'item' because it is a 'foreach iteration variable'."</p>