How to get the current directory in compact framework

compact-frameworkwindows-mobile

How do you get the current directory where your app is running?

Best Answer

You could try this:

using System.IO;
using System.Reflection;

namespace Utilities
{
    static public class DirectoryHelper
    {
        static public string GetCurrentDirectory ()
        {
            return Path.GetDirectoryName (Assembly.GetExecutingAssembly ().GetName ().CodeBase);
        }
    }
}
Related Topic