Live Chat Icon For mobile
Live Chat Icon

How do I determine which operating system is running

Platform: WinForms| Category: Deployment

The Environment class in the System namespace has this information.

	string versionText = Environment.OSVersion.Version.ToString();

	Dim versionText As String = Environment.OSVersion.Version.ToString()

The Version property has member properties such as Major and Minor that give additional information.

Note that XP is windows version 5.1

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.