I am implementing my own Lexer and just had a look at how C# handles char literals: https://msdn.microsoft.com/en-us/library/aa691087(v=vs.71).aspx
The C# char grammer is described in the link above
It specifies that the "new line" character is not allowed as a character literal.
But it doesn't state what the "new line" character is.
From my perspective it could be one of the following:
Since one file could be created on f.e. mac and then be compiled on windows I tend to believe that the "new line" character matches the grammer in case 4. I remember VS asking me if I'd like to convert my line endings to match the windows line endings in some cases. Since we can decline that option it is possible to stick with whatever endings the file contains.
Can someone confirm case 4 or tell me that I'm wrong?
Indeed, it can be either CR or LF, and a few more, according to spec:
https://msdn.microsoft.com/en-us/library/aa664812(v=vs.71).aspx
new-line-character:
Carriage return character (U+000D)
Line feed character (U+000A)
Line separator character (U+2028)
Paragraph separator character (U+2029)