使用经典案例
public class LowMemoryHelper
{
public static bool IsLowMemDevice { get; set; }
static LowMemoryHelper()
{
try
{
Int64 result = (Int64)DeviceExtendedProperties.GetValue("ApplicationWorkingSetLimit");
if (result < 94371840L)
IsLowMemDevice = true;
else
IsLowMemDevice = false;
}
catch (ArgumentOutOfRangeException)
{
// Windows Phone OS update not installed, which indicates a 512-MB device.
IsLowMemDevice = false;
}
}
}
然而,当在Lumia 800上运行时,我得到结果= 223506432,并且IsLowMemDevice = false;我对这种行为感到非常惊讶。
答案 0 :(得分:0)