Using escape sequences in identifiers

suggest change

Escape sequences are not restricted to string and char literals.

Suppose you need to override a third-party method:

protected abstract IEnumerable<Texte> ObtenirŒuvres();

and suppose the character Œ is not available in the character encoding you use for your C# source files. You are lucky, it is permitted to use escapes of the type \u#### or \U######## in identifiers in the code. So it is legal to write:

protected override IEnumerable<Texte> Obtenir\u0152uvres()
{
    // ...
}

and the C# compiler will know Œ and \u0152 are the same character.

(However, it might be a good idea to switch to UTF-8 or a similar encoding that can handle all characters.)

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


String Escape Sequences:
* Using escape sequences in identifiers

Table Of Contents
15 String Escape Sequences
17 Regex
19 Arrays
21 Enum
22 Tuples
24 GUID
27 Looping
36 Casting
46 Methods
88 Events
92 Structs
104 Indexer
106 Stream
107 Timers
109 Threading
127 Caching
135 Pointers
147 C# Script