title: Linq - Replace string within a List(of String)
body: <p>I have the following <code>List(Of String)</code> defined in my program:</p>
  
  <pre><code>MyList:
  1Test
  2test
  3
  4Test
  5
  </code></pre>
  
  <p>I would like to remove the word <strong>"Test"</strong> (regardless of capitalization) from each item in the list if it exists.</p>
  
  <p>I know I can accomplish this using the following LINQ statment:</p>
  
  <pre><code>MyList = (From MyEntry As String In MyList
            Select UCase(MyEntry).Replace("TEST", "")).ToList
  </code></pre>
  
  <p>To get the final result:</p>
  
  <pre><code>MyList:
  1
  2
  3
  4
  5
  </code></pre>
  
  <p>Now, just for the sake of learning Linq, I wanted to try doing it using different commands (and maybe even benchmarking them just to see which could be the best / most efficient). So I wanted to try:</p>
  
  <pre><code>MyList.ForEach(Function(MyEntry As String) MyEntry = UCase(MyEntry).Replace("TEST", ""))
  </code></pre>
  
  <p>But it doesn't seem to update the list.</p>
  
  <p>I'm assuming this is because <code>ForEach</code> doesn't replace the data being iterated over, but I wanted to hear from any LINQ experts out there what your thoughts are / what you would suggest as being the nicest / most elegant solution to accomplish this.</p>