How to get the path of app(without app.exe)?

前端 未结 7 1898
梦如初夏
梦如初夏 2020-12-09 06:28

I want to get the path of my app like: \"\\\\ProgramFiles\\\\myApp\", I try to use the following code:


string path = System.Reflection.Assembly.GetExecuting         


        
相关标签:
7条回答
  • 2020-12-09 07:05

    You can use Path.GetDirectoryName(string) method passing your original path string as parameter for this. What problem are you trying to solve? Maybe you really need something like working directory?

    0 讨论(0)
提交回复
热议问题