Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What character escape sequences are available?

character escape sequences
0
Posted

What character escape sequences are available?

0

C# defines the following character escape sequences: • \’ – single quote, needed for character literals • \” – double quote, needed for string literals • \\ – backslash • \0 – Unicode character 0 • \a – Alert (character 7) • \b – Backspace (character 8) • \f – Form feed (character 12) • \n – New line (character 10) • \r – Carriage return (character 13) • \t – Horizontal tab (character 9) • \v – Vertical quote (character 11) • \uxxxx – Unicode escape sequence for character with hex value xxxx • \xn[n][n][n] – Unicode escape sequence for character with hex value nnnn (variable length version of \uxxxx) • \Uxxxxxxxx – Unicode escape sequence for character with hex value xxxxxxxx (for generating surrogates) Of these, \a, \f, \v, \x and \U are rarely used in my experience.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123