I am a beginner in vb 10 (vb.net).
I am trying to create a text file "something.txt" and write a long string
to the file. My string contains formatting chars newline and carriage return, which I want to keep.
I tried:
FileToSave.Write("test" & Chr(10) & Chr(13) & "test2", RichTextBoxStreamType.RichText)
using the System.IO.StreamWriter method but the line feeds and carriage returns are lost and all the text is just streamed together with no formatting.
Where 'FileToSave' is the path and name of the file.
Note: I know I can use the vbnewline instead of chr(x) but this is not the issue.
Can anyone tell me what I am doing wring please?
regards
mol
I am trying to create a text file "something.txt" and write a long string
to the file. My string contains formatting chars newline and carriage return, which I want to keep.
I tried:
FileToSave.Write("test" & Chr(10) & Chr(13) & "test2", RichTextBoxStreamType.RichText)
using the System.IO.StreamWriter method but the line feeds and carriage returns are lost and all the text is just streamed together with no formatting.
Where 'FileToSave' is the path and name of the file.
Note: I know I can use the vbnewline instead of chr(x) but this is not the issue.
Can anyone tell me what I am doing wring please?
regards
mol