title: how to modify items in a Generic List using foreach?
body: <p>I have the following Generic List which is populated with a list of string:  </p>
  
  <pre><code>List&lt;string&gt; mylist =new List&lt;string&gt;();  
  myList.add("string1");  
  myList.add("string2");
  </code></pre>
  
  <p>Say I want to add 'test' at the end of each string, how can I do it in a simple way? Intuitively, I tried this which compiles ok:  </p>
  
  <pre><code>myList.ForEach(s =&gt; s = s + "test");  
  </code></pre>
  
  <p>But if I then look at the content of the List, nothing has changed. I guess I could use a for loop to iterate through the List but I'm looking for something very simple and using ForEach looks very neat.... but doesn't seem to work. Any ideas?</p>