Application.StartupPath

  • Thread starter Thread starter Doug Bell
  • Start date Start date
D

Doug Bell

Hi
how can I get the current working directory of my application?

Application.StartupPath does not seem to be available.
 
Hi,

You will have to use.

// This will get the full directory and application's exe name.

static String fullAppName =
Assembly.GetCallingAssembly().GetName().CodeBase;

// The GEt directory will strip off the app.exe name and provide you aith
the application's path.

static String fullAppPath = Path.GetDirectoryName(fullAppName);



Good luck
 
Thanks Moshe

Moshe Peleg said:
Hi,

You will have to use.

// This will get the full directory and application's exe name.

static String fullAppName =
Assembly.GetCallingAssembly().GetName().CodeBase;

// The GEt directory will strip off the app.exe name and provide you aith
the application's path.

static String fullAppPath = Path.GetDirectoryName(fullAppName);



Good luck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top