'Reading OS Version C#

I'm trying to get my os version using VersionString on .NET5. Here's the code (I found such an example somewhere on the internet).

string osVersion = Environment.OSVersion.VersionString;
Console.WriteLine("OS Version: " + osVersion);

The result is OS Version: Microsoft Windows NT 10.0.19043.0 However, I'm sure whether this is the correct result because my current OS version according to AIDA64 Business is 10.0.19043.1526. So I was wondering why the output of my program is 0 instead of 1526? Or mayde it doesn't matter?



Solution 1:[1]

The last set of digits is called the Update Build Revision (UBR) and can be accessed from the registry at

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UBR

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jia Wei