I stumbled upon this oddity today while playing with some code to go down different pathways in an application depending upon which Windows OS was running. The following code:
OperatingSystem os = Environment.OSVersion;
Version v = os.Version;
string osv = v.ToString();
Console.WriteLine("Revision=" + v.Revision.ToString());
Console.WriteLine("MinorRevision=" + v.MinorRevision.ToString());
Console.WriteLine("Minor=" + v.Minor.ToString());
Console.WriteLine("Major=" + v.Major.ToString());
Console.WriteLine("MajorRevision=" + v.MajorRevision.ToString());
Console.WriteLine(osv);
On my XP SP3 workstation the code above displays:
Revision=196608
MinorRevision=0
Minor=1
Major=5
MajorRevision=3
5.1.2600.196608
On one of our Win2003 SP2 servers it displays:
Revision=131072
MinorRevision=0
Minor=2
Major=5
MajorRevision=2
5.2.3790.131072
I was a little suprised at this, since the Major version number suggests that XP and Windows Server 2003 are basically the same version of Windows, with merely a minor version difference. Not entirely sure what the term “MajorRevision” means.
I was assuming that the third term in the full version number is the Build number, but v.Build actually returns blank in both cases.
That’s the version number of the Windows NT kernel.
Windows Server 2003 is in fact fairly similar to Windows XP at the kernel level, though there are many differences in the layers above the kernel, obviously. The Windows Server 2008 kernel is actually the same as the Windows Vista SP1 kernel, which is why the first service pack for Server 2008 was called SP2. And Windows 7 and Server 2008 R2 not only use the same kernel, but you can even use the same service pack to upgrade both of them to SP1.
Source for Windows version Number.