How to get the current OS version of Windows Phone?

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.


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

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


使用System.Environment.OSVersion.Version

链接地址: http://www.djcxy.com/p/96006.html

上一篇: 如何在Windows Phone 7.1中使用Windows手机存储测试套件

下一篇: 如何获得Windows Phone的当前操作系统版本?