检测的WinRT和Windows之间的区别8 [英] Detect the difference between WinRT and Windows 8

查看:103
本文介绍了检测的WinRT和Windows之间的区别8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关统计跟踪,我希望能够告诉如果应用程序在Windows RT或Windows Pro的运行。

For statistic tracking, I'd like to be able to tell if the application is running on Windows RT or Windows Pro.

这线程说,有没有办法获取系统版本信息:

This thread says that there's no way to get the system version info:

获取操作系统版本中的WinRT应用麦德龙C#

任何想法?

推荐答案

有一件事情你可以做的就是去配置管理器在Visual Studio和而不是默认的任何CPU配置 - 创建单独的ARM /在x86 / x64配置和项目属性/条件编译符号定义一个符号,是ARM与在x86 / x64配置不同。然后,你可以使用#如果#else伪的#endif预处理指令只是测试它在你的代码。

One thing you could do is to go to Configuration Manager in Visual Studio and instead of the default Any CPU configuration - create separate ARM/x86/x64 configurations and in project properties/Conditional compilation symbols define a symbol that is different for ARM vs. x86/x64 configurations. Then you can just test for it in your code using #if #else #endif preprocessor directives.

这篇关于检测的WinRT和Windows之间的区别8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆