title: Replace line feed (LF) characters in a String using VB.NET
body: <p>The obvious doesn't catch the LF characters</p>
  
  <pre><code>foo.Replace(Environment.NewLine, String.Empty)
  </code></pre>
  
  <p>Nor does...</p>
  
  <pre><code>foo.Replace("\r\n", "").Replace("\n", "").Replace("\r", "")
  </code></pre>
  
  <p>The file itself is a multi line XML file. Line feed characters before the XML declaration invalidate the string.</p>