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;
}
}

 

posted @ 2016-06-23 12:25  robinwyz  阅读(882)  评论(0编辑  收藏  举报