The C# team posts answers to common questions and describes new language features
C# defines the following character escape sequences:
Of these, \a, \f, \v, \x and \U are rarely used in my experience.
[Author: Jon Skeet]
C# Character Escape Sequences' - single quote, needed for character literals" - double quote, needed for string literals\ - backslash0 - Unicode character 0a - Alert (character 7)b - Backspace (character f - Form feed (character 12)n - New line (charac
PingBack from http://www.keyongtech.com/2771764-path
I am decoding xml files. I read in a line, then wish to replace xml encodings with the original characters. So, for example, I have "abc&def" yet when I try to add the & character to my string, it does not appear. I have tried textstring + '&', textstring + "&", and textstring + '\u0026' but the character is not in the string when I write it out later. What is going on here? (I've been working with c# for a few days only).
I don't know how it is in WinForms/C#, but in Win32/Delphi a number of GUI elements(such as as labels and menus) use & to mark an accelerator. The & is not displayed then, but instead the following char is underlined.
\v is called 'vertical tab' not 'vertical quote'
This is cool stuff!!!!
I'm new to c# and this will come in handy. THANKS BOB! ;-] .... my windows phone prof. for those who are wondering who Bob is.
One thing I'm confused about: the double backslash \\ is the escape sequence for a backslash, making it useful for specifying file paths, but I just encountered a program that used a double slash // in the filename string literal. It seems to me that this should not work, but it does. Why?
what is the use of escape character \r in programing?