C # specify the relative path,
1. root directory
. \ Or directly give the file name, which is the path to find the root directory.
For example, path = "gs. mdb" and path = ". \ gs. mdb" mean one thing.
2. The parent directory of the root directory is specified in the bin folder in C #.
.. \ Upper two levels of the application root directory
3. Specify the Level 3 directory above the root directory, that is, in the same directory as bin in C #.
.. \ Gs. mdb. This indicates the gs. mdb file in the third-level directory of the root directory.
If you want to specify a file in the specified folder in this directory, it should be as follows :.. \\.. \ dir \ gs. mdb indicates the gs under the dir file in this directory. mdb file.
4. Specify the level 4 directory to the root directory, as shown below:
In this way, the level 4 directory of the root directory is specified.
.. \ Dir \ gs. mdb to specify the path gs. mdb in the dir folder in this directory.
5. relative path of a file
.. \ DbMVC \ bin \ gs. mdb
For example, there are several folders dir, DbMVC, and fd, and the application is now in the dir folder, this path specifies the gs in the bin of DbMVC in the two directories on the dir file. mdb file path.