相关疑难解决方法(0)

获取应用程序文件夹路径的最佳方法

我看到有一些方法可以获取应用程序文件夹路径:

  1. Application.StartupPath
  2. System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().Location)
  3. AppDomain.CurrentDomain.BaseDirectory
  4. System.IO.Directory.GetCurrentDirectory()
  5. Environment.CurrentDirectory
  6. System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
  7. System.IO.Path.GetDirectory(Application.ExecutablePath)

取决于具体情况,最好的方法是什么?

.net c#

470
推荐指数
6
解决办法
55万
查看次数

标签 统计

.net ×1

c# ×1