I am asking about those two registry keys:
Both seem to contain the Windows 10 build number (10240 for RTM/TH1, 10586 for 1511/TH2).
Is there any (documented) difference between those two? Which one should I use to determine the "Version" of Windows 10?
Footnote: I am aware that usually checking for required features is better practice than checking version numbers. Note, however, that there are legitimate cases for wanting to get the version of the currently running OS, which I'll gladly discuss in the comments, if needed.