Skip to content

Commit 0a4a381

Browse files
joostasRon Petrusha
authored andcommitted
Extend sample with check for 4.7.1 version in cs and vb. (dotnet#4028)
1 parent 952bc0e commit 0a4a381

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

samples/snippets/csharp/framework/migration-guide/versions-installed3.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ private static void Get45PlusFromRegistry()
2626
// Checking the version using >= will enable forward compatibility.
2727
private static string CheckFor45PlusVersion(int releaseKey)
2828
{
29+
if (releaseKey >= 461308)
30+
return "4.7.1 or later";
2931
if (releaseKey >= 460798)
30-
return "4.7 or later";
32+
return "4.7";
3133
if (releaseKey >= 394802)
3234
return "4.6.2";
3335
if (releaseKey >= 394254) {

samples/snippets/visualbasic/framework/migration-guide/versions-installed3.vb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ Public Module GetDotNetVersion
1919

2020
' Checking the version using >= will enable forward compatibility.
2121
Private Function CheckFor45PlusVersion(releaseKey As Integer) As String
22-
If releaseKey >= 460798 Then
23-
Return "4.7 or later"
22+
If releaseKey >= 461308 Then
23+
Return "4.7.1 or later"
24+
Else If releaseKey >= 460798 Then
25+
Return "4.7"
2426
Else If releaseKey >= 394802 Then
25-
Return "4.6.2 or later"
27+
Return "4.6.2"
2628
Else If releaseKey >= 394254 Then
2729
Return "4.6.1"
2830
Else If releaseKey >= 393295 Then

0 commit comments

Comments
 (0)