.NET CF上取得当前程序运行路径的办法
使用.NET CF的API
Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase)+@"\"
使用P/Invoke Core API:
Q: How can I get current directory of my application on .net cf
A: Unfortunately I don’t know the .NET CF answer for this. I know in native code you can use GetModuleFileName to get the full path to the current .exe, and chop off the .exe name to get the path. In general Windows CE does not expose the concept of a “current directory,” but the .NET CF may.