Forward slash (/) and backslash (\) Summary

Source: Internet
Author: User

Forward slash (/), also known as the left slash "/";
The backslash "\".

What is the difference between a forward slash and a backslash? The following is a summary:

DOS path:
C: \ windows \ setting .. this is the backslash followed by the file name
C: \ DIR/P... this is the forward slash followed by a nameorder parameter DIR is the command.

C # medium:

In C #, \ is an escape character, as shown below:
Escape Sequence Character
\' Single quotes
\" Double quotation marks
\\ Backslash
\ 0 Null
\ Warning
\ B Return
\ F Form feed
\ N Line feed
\ R Vehicle adding
\ T Horizontal Tab
\ V Vertical Tab
In addition, many people like to use "D: \ test.txt" when obtaining the file path, and then the so-called Escape Character error will occur.
The solution is generally used @ "D: \ test.txt"

 

Windows: backslash \, used to represent directories in windows.
Forward slash/, URL, URL address.

 

In a UNIX system,/indicates a directory. Because the Web Name follows the Unix name,/indicates the directory in the URL.

In Asp.net:
"../" Indicates the parent directory of the current directory, that is, the parent directory of the current directory;
"/" Indicates the root directory of the website;

 

Silverlight:
(Updating ..)

Reprinted:

Http://www.cnblogs.com/lyfblog/archive/2011/03/24/1993480.html

Forward slash (/), also known as the left slash "/";
The backslash "\".

What is the difference between a forward slash and a backslash? The following is a summary:

DOS path:
C: \ windows \ setting .. this is the backslash followed by the file name
C: \ DIR/P... this is the forward slash followed by a nameorder parameter DIR is the command.

C # medium:

In C #, \ is an escape character, as shown below:
Escape Sequence Character
\' Single quotes
\" Double quotation marks
\\ Backslash
\ 0 Null
\ Warning
\ B Return
\ F Form feed
\ N Line feed
\ R Vehicle adding
\ T Horizontal Tab
\ V Vertical Tab
In addition, many people like to use "D: \ test.txt" when obtaining the file path, and then the so-called Escape Character error will occur.
The solution is generally used @ "D: \ test.txt"

 

Windows: backslash \, used to represent directories in windows.
Forward slash/, URL, URL address.

 

In a UNIX system,/indicates a directory. Because the Web Name follows the Unix name,/indicates the directory in the URL.

In Asp.net:
"../" Indicates the parent directory of the current directory, that is, the parent directory of the current directory;
"/" Indicates the root directory of the website;

 

Silverlight:
(Updating ..)

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.