How to get the current OS version of Windows Phone?

前端 未结 2 1215
孤街浪徒
孤街浪徒 2020-12-06 19:36

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

相关标签:
2条回答
  • 2020-12-06 20:40

    Use System.Environment.OSVersion.Version

    0 讨论(0)
  • 2020-12-06 20:41

    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

    0 讨论(0)
提交回复
热议问题