Get the startup path in a vb.net console exe

后端 未结 3 1963
半阙折子戏
半阙折子戏 2021-01-05 19:06

How do get the startup path ( system.windows.forms.application.StartupPath ) of my exe without adding a reference to system.windows.forms?

3条回答
  •  滥情空心
    2021-01-05 19:12

    You could try

    System.AppDomain.CurrentDomain.BaseDirectory
    

    which would work for most cases.

提交回复
热议问题