OperatingSystem Constructor (PlatformID, Version)

 

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 Sub New (
	platform As PlatformID,
	version As 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.

Exception Condition
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
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: