C
C#2y ago
xq2

❔ Get Windows Version?

Im trying to get the current users windows version and match it to a specified one and make an if statement. How do i do that in C# ?
7 Replies
ero
ero2y ago
You could do OperatingSystem.IsWindowsVersionAtLeast()
MODiX
MODiX2y ago
Method: System.OperatingSystem.IsWindowsVersionAtLeast(Int32, Int32, Int32, Int32) Checks if the Windows version (returned by RtlGetVersion) is greater than or equal to the specified version. This method can be used to guard APIs that were added in the specified Windows version.
React with ❌ to remove this embed.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
jast.313
jast.3132y ago
try 'Environment.OSVersion.Version.Major'
jast.313
jast.3132y ago
Stack Overflow
How to translate MS Windows OS version numbers into product names i...
How to translate MS Windows OS version numbers into product names? For example, in .NET the following two properties could be used to work out that the product is MS Windows Vista Ultimate Edition...
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server