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
 
Back
Top