C # AppDomain. CurrentDomain. BaseDirectory and various path obtaining methods,
// Obtain the base Directory of the program.
System. AppDomain. CurrentDomain. BaseDirectory
// Obtain the complete path of the module, including the file name
System. Diagnostics. Process. GetCurrentProcess (). MainModule. FileName
// Obtain andSetThe fully qualified directory of the current directory (the directory from which the process starts.
System. Environment. CurrentDirectory
// Obtain the current working directory of the application,Note that the working directory can be changed, not limited to the directory where the program is located..
System. IO. Directory. GetCurrentDirectory ()
// Obtain and set the Directory Name of the application.
System. AppDomain. CurrentDomain. SetupInformation. ApplicationBase
// Obtain the executable file path of the application.
System. Windows. Forms. Application. StartupPath
// Obtain the path and file name of the executable file that has started the application
System. Windows. Forms. Application. ExecutablePath