Why isn't the change to a field in an IEnumerable executed?
<p>This was a surprise to discover that the following call didn't seem to remember the changes made to the field.</p>

<pre><code>private void Foo(IEnumerable&lt;Blopp&gt; blopps)
{
  foreach (Blopp blopp in blopps)
    blopp.SomeField = PREFIX + blopp.SomeField;

  String test = blopps.First().SomeField;
}
</code></pre>

<p>The <em>test</em> variable lacks the prefix when the array is obtained using LINQ to data. I need to evaluate the <em>IEnumerable</em> and make it a <em>List</em> in order to make the changes to the fields sustain. Why is it so? I would expect the program to recognize that the field <strong>is</strong> used later on and evaluate it.</p>

<pre><code>private void Foo(IEnumerable&lt;Blopp&gt; _blopps)
{
  List&lt;Blopp&gt; blopps = _blopps.ToList();
  foreach (Blopp blopp in blopps)
    blopp.SomeField = PREFIX + blopp.SomeField;

  String test = blopps.First().SomeField;
}
</code></pre>
