title: Remove newline-character
body: <p>I have a file which looks like this:</p>
  
  <pre><code>1
  
  2
  
  3
  
  4
  5
  6
  7
  </code></pre>
  
  <p>I want to read it in and remove the newline characters. My attempt is this:</p>
  
  <pre><code>StreamReader reader = new StreamReader("t.txt");
  string text = reader.ReadToEnd();
  text.Replace(System.Environment.NewLine, " ");
  Console.WriteLine(text);
  </code></pre>
  
  <p>But the output is still the same as above. I want the output to be:</p>
  
  <pre><code>1 2 3 4 5 6 7
  </code></pre>
  
  <p>What am I doing wrong?</p>