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.

[C#]
	string versionText = Environment.OSVersion.Version.ToString();

[VB.NET]
	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

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

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

Please submit your question and answer.