Tuesday, March 27, 2007

Detect OS Version Using C#

// Get the Operating System From Environment Class
OperatingSystem os = Environment.OSVersion;
// Get the version information
Version vs = os.Version;

MessageBox.Show (vs.Major.ToString());
// vs.Major;
//vs.Minor;
//vs.Revision;
//vs.Build;

No comments: