Skip to content

Commit

Permalink
Add 20H02
Browse files Browse the repository at this point in the history
  • Loading branch information
clairernovotny committed Sep 14, 2020
1 parent e4776bc commit 89efa28
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
9 changes: 7 additions & 2 deletions OSVersionHelper/Windows10Release.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ public enum Windows10Release
/// <summary>
/// 10.0.19041.0 (20H01)
/// </summary>
May2020 = 2004

May2020 = 2004,

/// <summary>
/// 10.0.19042.0 (20H02)
/// </summary>
September2020 = 2009

}
}
11 changes: 10 additions & 1 deletion OSVersionHelper/WindowsVersionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ static WindowsVersionHelper()
{
if (IsSince(WindowsVersions.Win10))
{
if (IsApiContractPresent(10))
if (IsApiContractPresent(11))
{
Windows10Release = Windows10Release.September2020;
} else if (IsApiContractPresent(10))
{
Windows10Release = Windows10Release.May2020;
}
Expand Down Expand Up @@ -81,6 +84,12 @@ static WindowsVersionHelper()

public static bool IsWindows10 { get; } = IsWindowsNt && IsSince(WindowsVersions.Win10);


/// <summary>
/// Gets a value indicating whether the current OS is Windows 10 September 2020 Update (20H02) or greater
/// </summary>
public static bool IsWindows10September2020OrGreater => IsWindows10 && Windows10Release >= Windows10Release.September2020;

/// <summary>
/// Gets a value indicating whether the current OS is Windows 10 May 2020 Update (20H01) or greater
/// </summary>
Expand Down

0 comments on commit 89efa28

Please sign in to comment.