3

I want to know the application startup path for C# 2.0 windows form application. One way is Application.StartupPath. Is there another way to find the application startup path?

kobra
  • 4,853
  • 10
  • 32
  • 33
  • 2
    Why do you need to use anything other than Application.StartupPath? – Jim W Sep 11 '09 at 05:07
  • If you already have one way, why do you want another? – Mitch Wheat Sep 11 '09 at 05:07
  • If your asking this question, it leads me to believe the Application.StartupPath is not returning what you expect. Is this for Visual Studio Tools for Office, if so which version? – AMissico Sep 11 '09 at 05:10
  • The application startup path is not necessarily the directory the binaries are in. Perhaps that is what OP is really after. – Thorarin Sep 11 '09 at 05:10
  • I wanted to check my application using different options to see how will they function under different circumstances. I though knowing different options will help me. Thanks. – kobra Sep 11 '09 at 05:56

2 Answers2

8

AppDomain.CurrentDomain.BaseDirectory

Tadas Šukys
  • 4,140
  • 4
  • 27
  • 32
6

Look at this: How can I get the application's path in a .NET console application?

Community
  • 1
  • 1
J. Random Coder
  • 1,322
  • 11
  • 21