How to get the current OS version of Windows Phone?

℡╲_俬逩灬. 提交于 2019-11-26 23:30:15

问题


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.


回答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




回答2:


Use System.Environment.OSVersion.Version



来源:https://stackoverflow.com/questions/8340908/how-to-get-the-current-os-version-of-windows-phone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!