Well, the behaviour is perfectly ok. The @ creates a verbatim string, i.e. a string that is exactly how it looks (something like WYSIWYG).
andCode:string s = @"c:\folder\file.txt";
are the same.Code:string s = "c:\\folder\\file.txt";
In your case:
is the same withCode:string s = @"this is a test \r\n new line";
Do what MadHatter indicated.Code:string s = "this is a test \\r\\n new line";




Marius Bancila
Reply With Quote