C # Gets the method collection of the current program run path the difference between Application.startuppath and System.Environment.CurrentDirectory

Source: Internet
Author: User

The meaning of System.Environment.CurrentDirectory is to get or set the current working path,
And Application.startuppath is the Get program startup path,
On the surface there is no difference, but the difference is really big.

First say the former: for example, you put the program on the desktop to start, but in the middle you use a OpenFileDialog open the E-disk named ABC folder under a file, then CurrentDirectory becomes E:\ABC,
So if you want to get a file from the program Startup folder again, it's useless.

But Application.startuppath won't do that, no matter which disk you open in the middle of the file, the boot path is on the desktop, has not changed.

C # Gets the method collection of the current program run path the difference between Application.startuppath and System.Environment.CurrentDirectory

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.