C# - Escape sequences in C# as a language feature

By , 6/29/2015
(0 ratings)
This snippet shows that C# has also some strange features.
Escape sequences are interpreted in strings and in identifiers too!

I think it is obviously that we can argue about the benefit of this features.
var \u0078 = "Value of x";
Console.WriteLine(x);

var \u0061\u0062\u0063 = "Value of abc";
Console.WriteLine(abc);

Console.ReadKey();
Tagged with Unicode, C#, Compiler, Feature.

Comments

 

Log in, to comment!