如何获取 Windows Phone 的当前操作系统版本? [英] How to get the current OS version of Windows Phone?

查看:33
本文介绍了如何获取 Windows Phone 的当前操作系统版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要获取 Windows 手机的当前操作系统版本.也就是说,如果是 Windows Phone 7.0 或 7.1,那么我必须编写支持两个操作系统版本的代码.我必须在 7.0 和 7.1 中运行我的应用程序.

I need to get the current OS version of a Windows phone. That is, if it is Windows Phone 7.0 or 7.1, so that I have to write code supporting for both OS versions. I have to run my app in both 7.0 and 7.1.

推荐答案

你可以通过下面这个语句获得手机OS的OS Major和Minor版本

you can get the OS Major and minor version of the phone OS through this following statement

temp = System.Environment.OSVersion.Version.Major
temp = System.Environment.OSVersion.Version.Minor

在 WP 7.0 和 7.1 主要版本中都是 7但次要版本不同.Wp7.0 为 0,7.1 为 10

in both the WP 7.0 and 7.1 major version is 7 but Minor version differs. For Wp7.0 it is 0 and 7.1 it is 10

这篇关于如何获取 Windows Phone 的当前操作系统版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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