Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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


Type: System.PlatformID

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

Type: System.Version

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


version is null.


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

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8
© 2015 Microsoft