Added a way to test for Windows 11.

This commit is contained in:
Robin Krom 2022-01-25 10:40:36 +01:00
commit fda0cd9555
No known key found for this signature in database
GPG key ID: BCC01364F1371490

View file

@ -21,6 +21,12 @@ namespace Greenshot.Base.Core
/// <returns>true if we are running on Windows 10</returns>
public static bool IsWindows10 { get; } = WinVersion.Major == 10;
/// <summary>
/// Test if the current OS is Windows 11 or later
/// </summary>
/// <returns>true if we are running on Windows 11 or later</returns>
public static bool IsWindows11OrLater { get; } = WinVersion.Major == 10 && WinVersion.Build >= 22000;
/// <summary>
/// Test if the current OS is Windows 10 or later
/// </summary>