Best way to get application folder path

前端 未结 10 2313
無奈伤痛
無奈伤痛 2020-11-22 02:03

I see that there are some ways to get the application folder path:

  1. Application.StartupPath
  2. System.IO.Path.GetDirectoryName( System.
10条回答
  •  生来不讨喜
    2020-11-22 02:39

    If you know to get the root directory:

    string rootPath = Path.GetPathRoot(Application.StartupPath)
    

提交回复
热议问题