Sunday, July 5, 2009

Find the Operating System Version

The System.Environment.OSVersion static (shared) property is used to find the operating system version of the system.

Prerequisites

Import System.Environment in the top of the Windows form.

Example


Imports System.Environment

Public Class Form1

Private Sub DisplayOSVersion

Dim os As OperatingSystem = Environment.OSVersion

MessageBox.Show("OS Version:" & os.Version.ToString())

MessageBox.Show("OS platform:" & os.Platform.ToString())

End Sub

End Class


No comments:

Post a Comment