New C# 11 feature "raw string literals" seems to be using \n to break the line:
const string text = """
"header1";"header2"
"value1";"value2"
""";
This will produce "header1";"header2"\n"value1";"value2"\n
How can I make it produce "header1";"header2"\r\n"value1";"value2"\r\n?
I had problemen with string literals and unit tests. On my PC Environment.NewLine was different from the buildserver. So test results where different for:
and
So I changed the second to:
using these extensions methods:
If you want a \r\n as line end. Just do this: