private void btnDump_Click(object sender, EventArgs e)
{
using (StreamWriter sw = new StreamWriter("E:\\TestFile.txt"))
{
// Add some text to the file.
sw.WriteLine(txtChange.Text);
}
}
This dumps the text of txtChange to a text file. txtChange is a Rich text box and has line breaks (new lines) in it.
When the user clicks the Dump button all the text is Dumped but not on new lines.
E.g. txtChange looks like
1
2
3
4
dumping the text looks like 1234
How do i format the dumping of the text so that the text is on new lines?