My.Computer.Info.OSPlatform Property
Gets the platform identifier for the operating system of the computer.
' Usage
Dim value As String = My.Computer.Info.OSPlatform
' Declaration
Public ReadOnly Property OSPlatform As String
Return Value
A String containing the platform identifier for the operating system of the computer, chosen from the member names of the PlatformID enumeration.
Exceptions
The following condition can cause an exception:
- The application cannot obtain the operating-system platform information (ExecutionEngineException).
Remarks
The My.Computer.Info.OSPlatform property provides functionality similar to the Platform property of the object returned by the OSVersion property.
Example
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: " & _
My.Computer.Info.OSPlatform)
Requirements
Namespace: Microsoft.VisualBasic.Devices
Class: ComputerInfo
Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)
Availability by Project Type
Project type | Available |
---|---|
Windows Application |
Yes |
Class Library |
Yes |
Console Application |
Yes |
Windows Control Library |
Yes |
Web Control Library |
Yes |
Windows Service |
Yes |
Web Site |
Yes |
Permissions
No permissions are required.
See Also
Reference
My.Computer.Info Object
Platform
OSVersion
Microsoft.VisualBasic.Devices.ComputerInfo.OSPlatform