get the EXE directory from C#

From my code, I want to get the directory where the program is located.
All I could find is the current working directory:

string path = Directory.GetCurrentDirectory();

which is not quite the same thing.



Answer this question

get the EXE directory from C#

  • Corrine

    Nevermind, I found it:

    Application.StartupPath



  • get the EXE directory from C#