From RichTextBox to text files, line after line

后端 未结 3 2062
小蘑菇
小蘑菇 2020-12-18 17:59

I have trouble with saving file from Richtextbox to text file.

My richtextbox looks like this;

ABC    ...
 SDE   ...
KLO    ...

Af

3条回答
  •  清酒与你
    2020-12-18 18:10

    I know this question is pretty old but here is an alternate code for people who might run into this problem in the future

    File.WriteAllLines(saveFileDialog1.FileName, richTextBox1.Lines);

提交回复
热议问题