private static string m_CurrentPath;
private static string Platform
{
get
{
return Environment.OSVersion.Platform.ToString();
}
}
/// <summary>
/// 获取运行路径
/// </summary>
public static string CurrentPath
{
get
{
if (Platform.Equals("WinCE"))
{
m_CurrentPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);
}
else if (Platform.Equals("Win32NT"))
{
m_CurrentPath = Directory.GetCurrentDirectory();
}
return m_CurrentPath;
}
}
private static string Platform
{
get
{
return Environment.OSVersion.Platform.ToString();
}
}
/// <summary>
/// 获取运行路径
/// </summary>
public static string CurrentPath
{
get
{
if (Platform.Equals("WinCE"))
{
m_CurrentPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);
}
else if (Platform.Equals("Win32NT"))
{
m_CurrentPath = Directory.GetCurrentDirectory();
}
return m_CurrentPath;
}
}