.net CF - How to get the current directory where my app is running??

I have an app for Pocket PC, but i don't know how to get the current directory where my app is running...

tnks in advance,

Nelson



Answer this question

.net CF - How to get the current directory where my app is running??

  • SheilaK1

    Thread moved to the appropriate forum

    you need to do some string parsing and use the Assembly.GetExecutingAssembly() methods:

     

    string theApplicationRunningPath = Assembly.GetExecutingAssembly().GetName().CodeBase.SubString(0, Assembly.GetExecutingAssembly().GetNAme().CodeBase.LastIndexOf(@"\"));

     

    be sure to import the System.Runtime, System.Runtime.InteropServices namespaces



  • .net CF - How to get the current directory where my app is running??