OperatingSystem Constructor

Initializes a new instance of the OperatingSystem class, using the specified platform identifier value and version object.

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

public OperatingSystem(
	PlatformID platform,
	Version version
)

Parameters

platform
Type: System.PlatformID

One of the PlatformID values that indicates the operating system platform.

version
Type: System.Version

A Version object that indicates the version of the operating system.

ExceptionCondition
ArgumentNullException

version is null.

ArgumentException

platform is not a PlatformID enumeration value.

Notes to Callers

If you are using the OperatingSystem class to retrieve information about the runtime operating system, you should not call this constructor to instantiate an OperatingSystem object. Instead, you can retrieve an OperatingSystem object that describes the operating system from the Environment.OSVersion property.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft