before adding the text to RTF property in RichTextBox, i make some processing on the text, add escape character then divide the data to multiline.
the text is
line1 \n\u001aline2 \n\u001aline3 \n\u001aline4
When i use VS 2015 with .Net 4.6.2 the value in RTF property is
{\\rtf1\\fbidis\\ansi\\deff0{\\fonttbl{\\f0\\fnil\\fcharset0
Arial;}}\r\n\\viewkind4\\uc1\\pard\\ltrpar\\lang3073\\fs24 Line1
\\par\r\n\\v\\'1a\\v0 Line2
\\par\r\n\\v\\'1a\\v0 Line3
\\par\r\n\\v\\'1a\\v0 Line4\\par\r\n}\r\n
but when i switched to VS 2017 with .Net 4.7.1 the value changed to
{\\rtf1\\fbidis\\ansi\\deff0\\nouicompat{\\fonttbl{\\f0\\fnil\\fcharset0
Arial;}}\r\n{\\*\\generator Riched20 10.0.16299}\\viewkind4\\uc1
\r\n\\pard\\ltrpar\\fs24\\lang1033 Line1
\\par\r\n\\v\\'1a\\v0 Line2 \\par\r\n\\v\\'1a\\v0
Line3 \\par\r\n\r\n\\pard\\ltrpar\\v\\'1a\\v0
Line4\\par\r\n}\r\n
and when i accessed the Text property i got this Text
Line1 \nLine2 \nLine3 \nLine4
RichTextBox removes the escape character in VS 2017 anyone knows Why?