wince 下获取文件所在的路径
private static string strPath;
private static string PlatformID
{
get
{
//返回系统版本信息
return Environment.OSVersion.Platform.ToString();
}
}
public static string CurrentPath
{
get
{
//判断系统平台
if (PlatformID.Equals("WinCE"))
{
strPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);
}
else if(PlatformID.Equals("Win32NT"))
{
strPath = Directory.GetCurrentDirectory();
}
return strPath;
}
}