C # escape character (better memory than bad pen)

Source: Internet
Author: User

C # Escape characters:

• A special character constant;
• Start with a backslash "\" followed by one or several characters.
• Have a specific meaning, different from the original meaning of the character, it is called "escape" character.
• Used primarily to denote control codes that are not easily represented by ordinary characters.
• Its role is to eliminate the original meaning of the character immediately following it
• Use a combination of some ordinary characters instead of some special characters, because their combination changes the meaning of the original character representation, so called "escaping"
• Use a visible character to indicate a character that cannot be seen, such as ' \ n ' for a newline

Commonly used escape characters and their meanings:
\ ' Single quotation mark
\ "Double quotation marks
\ \ counter Slash
Air
\a warning (generates peak)
\b Backspace
\f Page Change
\ nthe line break
\ r Enter
\ t Horizontal tab
\v Vertical Tab

in C #, it says:
In C #, "c:\\temp" means that the path is c:\temp; and @ "C:\Temp" means c:\temp;

So, the action of @ should be to ignore the escape character.

Ext.: http://www.cnblogs.com/netlyf/archive/2009/09/19/1569815.html

C # escape character (better memory than bad pen)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.