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 ..)