How to export the contents of the string or textbox to txt file that remains the same format (If string has 5 lines, txt file will has 5 lines)?
<pre><code>if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
    FileInfo Myfile = new FileInfo(saveFileDialog1.FileName);
    StreamWriter wri = Myfile.CreateText();
    wri.WriteLine(Richtextbox.Text);
    wri.Close();
}
</code></pre>

<p>When I export to a text file, all the lines in richtextbox stick into one line. I donnot know how to  keep file txt'content same as in richtextbox'content. </p>
