How can I load a file in a c# app so that I can see it formatted.
If I use:
richTextBox2.LoadFile("a.txt", RichTextBoxStreamType.PlainText);
I did it with:
开发者_JAVA百科textBox2.Text = File.ReadAllText("a.txt");
The text is not formatted at all, new lines and CR's are totally missing, also the tabs
also the file open ok in notepad, but it opens bad in wordpad
Can I load the file in a textbox? (use multi-line)
Have you tried loading it as RichText?
richTextBox2.LoadFile("a.rtf", RichTextBoxStreamType.RichText);
精彩评论