sti*_*g_1 5 c# floating-point compact-framework windows-mobile
我已经看到这段代码在 intertubes 上浮动,用于确定 Windows Mobile 设备是否具有 VGA 屏幕(代码位于 Form 类的方法中):
SizeF currentScreen = this.CurrentAutoScaleDimensions;
bool isVGA = currentScreen.Height == 192;
Run Code Online (Sandbox Code Playgroud)
即使屏幕是 VGA,因为浮点不精确(高度属性是浮点数),isVGA 是否有可能设置为 false?