Line-breaks in Exception.Message
c#, exception, string
Solution
\r\n characters will be converted to new line when you display it by using message box or assign it to text box or whenever you use it in interface.
Problem
I'm extending Exception to implement a setter on the Message property. And this works just fine. But somehow this: ``` CustomException.Message = "Test" + Environment.NewLine + "Test Again"; ``` Becomes this: ``` "Test\r\nTest Again" ``` I've also tried this, with no luck: ``` CustomException.Message = @"Test Test Again"; ``` Any ideas?