How to get Current Project Directory path using C#

后端 未结 9 773
旧巷少年郎
旧巷少年郎 2020-12-31 08:19

okay, here is the question. I have two projects one is C# Console and other is Class library. I am accessing/calling Class library method from the console app. There is a fo

9条回答
  •  时光说笑
    2020-12-31 08:45

    Despite i cant find a good solution i use this trick : as long as you want to come back to your ideal path u should add Directory.GetParent() instead of ...

      Directory.GetParent(...(Directory.GetParent(Directory.GetCurrentDirectory()).ToString()...).ToString()
    

提交回复
热议问题