ComputerInfo.OSPlatform Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the platform identifier for the operating system of the computer.

Namespace:   Microsoft.VisualBasic.Devices
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

public string OSPlatform { get; }

Property Value

Type: System.String

A String containing the platform identifier for the operating system of the computer, chosen from the member names of the PlatformID enumeration.

Exception Condition

The application cannot obtain the operating-system platform information.

The My.Computer.Info.OSPlatform property provides functionality similar to the Platform property of the object returned by the OSVersion property.

This example uses the My.Computer.Info.OSPlatform property to display the platform of the computer's operating system.

MsgBox("Computer's operating system platform: " & 

.NET Framework
Available since 2.0
Return to top