visual studio - VB.Net - Write plain text to .txt, keep carriage returns -


i have form load .txt files richtextbox. event triggers:

rtxtsonotes.loadfile(sttextlink, richtextboxstreamtype.plaintext) 

i want ability add text , replace old file contents of richtextbox button:

my.computer.filesystem.writealltext(sttextlink, rtxtsonotes.text, false) 

this works great if stay within form, displays how told in richtextbox, meaning new lines/carriage returns there. however, if open actual .txt file in notepad boiled down 1 continuous line , unreadable users. don't want form way users can read file.

is there way preserve carriage returns when writing form .txt file? prefer keep files .txt if possible, rather .rtf.

maybe like

system.io.file.writealllines(sttextlink, rtxtsonotes.lines) 

Comments