Escape characters

Apr 28, 2014 at 1:16 PM
If I have a string in my source like this:

"This is the first line\n\nThis is the second line"

the compiler converts the occurrences of \n into newline characters. However, if I have the same text in a resource file, this doesn't happen and I end up with the literal string being displayed.

Is there a way of getting the code generator to perform some form of translation on the strings so that escaped characters are converted back to the raw characters?
May 4, 2014 at 8:08 AM
I've done some more research and it looks like http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.unescape.aspx might do the trick. I haven't tested it yet but will do so soon. That link came from http://stackoverflow.com/questions/6629020/evaluate-escaped-string.