title: From RichTextBox to text files, line after line
body: <p>I have trouble with saving file from Richtextbox to text file.</p>
  
  <p>My richtextbox looks like this; </p>
  
  <pre><code>ABC    ...
   SDE   ...
  KLO    ...
  </code></pre>
  
  <p>After i saved it looks like this:</p>
  
  <pre><code>ABC ... SDE ... KLO ...
  </code></pre>
  
  <p>But i want the same like richtextbox line after lines. What did i do wrong?</p>
  
  <pre><code> if (saveFileDialog2.ShowDialog() == DialogResult.OK)
          {
              StreamWriter sw = File.CreateText(saveFileDialog2.FileName);
              sw.WriteLine(richTextBox1.Text);
              sw.Flush();
              sw.Close();
  
              //File.WriteAllText(saveFileDialog2.FileName, str);
          }
  </code></pre>