OSVersion Property
Collapse the table of content
Expand the table of content

Environment.OSVersion Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets an OperatingSystem object that contains the current platform identifier and version number.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public static OperatingSystem OSVersion { get; }

Property Value

Type: System.OperatingSystem
An OperatingSystem object.

ExceptionCondition
InvalidOperationException

This property was unable to obtain the system version.

-or-

The obtained platform identifier is not a member of PlatformID.

Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows CE Platform Note: The version revision field for this property is always -1.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft