ComputerInfo.OSVersion Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the version of the computer's operating system.
public:
property System::String ^ OSVersion { System::String ^ get(); };
public string OSVersion { get; }
member this.OSVersion : string
Public ReadOnly Property OSVersion As String
Property Value
A String
containing the current version number of the operating system.
Exceptions
The application cannot obtain the operating-system version information.
Examples
This example uses the My.Computer.Info.OSVersion
property to display the version of the computer's operating system.
MsgBox("Computer's operating system version: " &
My.Computer.Info.OSVersion)
Remarks
The My.Computer.Info.OSVersion
property formats the version as "major.minor.build.revision".
The My.Computer.Info.OSVersion
property provides functionality similar to the Version property of the object returned by the OSVersion property.