[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 860
  • Last Modified:

Path to Directory in Pocket PC using C#

Hello All,
I have an application that I am creating that will run on Pocket PC 2003 SE.
The code base is C# using the Compact Framework 2.0.

I need to know in code how to get the path to a folder on the Pocket PC.
I am creating an xml file to load configurations.

THanks!
0
abennett10
Asked:
abennett10
1 Solution
 
grayeCommented:
As you've already figured out... the CF doesn't support Directory.GetCurrentDirectory.... so you have to do it the hard way, as in...
 

MessageBox.Show(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)); 

MessageBox.Show(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\SomePath");

Open in new window

0
 
abennett10Author Commented:
Thanks! That worked.....yea there a few things different about CF that I have to keep my eye on.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now