namespace MiniCafe.Util
{
public class Framework
{
/// <summary>
/// determine if app is running on netcf
/// </summary>
public static bool IsNetCF
{
get
{
bool flag = false;
try
{
System.IO.Directory.GetCurrentDirectory();
}
catch
{
flag = true;
}
return flag;
}
}
}
}
{
public class Framework
{
/// <summary>
/// determine if app is running on netcf
/// </summary>
public static bool IsNetCF
{
get
{
bool flag = false;
try
{
System.IO.Directory.GetCurrentDirectory();
}
catch
{
flag = true;
}
return flag;
}
}
}
}
我想应该有更加正统的方法来判断这个问题,继续探索中...