Fix two compilation constants for .NET 8 (#81775)
authorStephen Toub <stoub@microsoft.com>
Tue, 7 Feb 2023 22:47:28 +0000 (17:47 -0500)
committerGitHub <noreply@github.com>
Tue, 7 Feb 2023 22:47:28 +0000 (17:47 -0500)
src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Internal/NamespaceCache.cs
src/libraries/System.Text.Json/src/System/Text/Json/Reader/JsonReaderHelper.cs

index bafbb8f..6eddead 100644 (file)
@@ -207,7 +207,7 @@ namespace System.Reflection.Metadata.Ecma335
         {
             Debug.Assert(realChild.HasFullName);
 
-#if NET8_OR_GREATER
+#if NET8_0_OR_GREATER
             int numberOfSegments = fullName.AsSpan().Count('.');
 #else
             int numberOfSegments = 0;
index 33ccb5d..03d89f9 100644 (file)
@@ -20,7 +20,7 @@ namespace System.Text.Json
             {
                 newLines = 1;
                 data = data.Slice(0, lastLineFeedIndex);
-#if NET8_OR_GREATER
+#if NET8_0_OR_GREATER
                 newLines += data.Count(JsonConstants.LineFeed);
 #else
                 int pos;