How to check if your running Windows 7 in code

   1: //Windows 7 is version 6.1

   2: //Windows XP is version 5.1

   3: If (Environment.OSVersion.Version < new Version(6, 1)

   4: {

   5: //Checks if the OS is Windows 7 or greater

   6: }

Advertisements

Got something to add?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s