Original: "C # Legacy" Gets the difference between the System.IO.Directory.GetCurrentDirectory and System.Windows.Forms.Application.StartupPath of the application path
In the. Net Framework, the System.IO.Directory.GetCurrentDirectory () method is used to obtain the application's current working directory
If you use this method to obtain the directory where the application resides, you should note thatthe directory path obtained by the System.IO.Directory.GetCurrentDirectory () method follows the OpenFileDialog, Changes to directories determined by objects such as SaveFileDialog (switch working directory)
In general, you should use System.Windows.Forms.Application.StartupPath or System.AppDomain.CurrentDomain.BaseDirectory to get the directory where the application resides
"C # Legacy" Gets the difference between the System.IO.Directory.GetCurrentDirectory and System.Windows.Forms.Application.StartupPath of the application path