C # specify the relative path,

Source: Internet
Author: User

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.

Related Article

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.