diff --git a/Code/Light.GuardClauses.Tests/CommonAssertions/IsApproximatelyTests.cs b/Code/Light.GuardClauses.Tests/CommonAssertions/IsApproximatelyTests.cs
index 70db5a8..8803b9c 100644
--- a/Code/Light.GuardClauses.Tests/CommonAssertions/IsApproximatelyTests.cs
+++ b/Code/Light.GuardClauses.Tests/CommonAssertions/IsApproximatelyTests.cs
@@ -41,7 +41,7 @@ public static void FloatWithDefaultTolerance(float first, float second, bool exp
public static void FloatWithCustomTolerance(float first, float second, float tolerance, bool expected) =>
first.IsApproximately(second, tolerance).Should().Be(expected);
-#if NET8_0
+#if NET8_0_OR_GREATER
[Theory]
[InlineData(1.1, 1.3, 0.5, true)]
[InlineData(100.55, 100.555, 0.00001, false)]
diff --git a/Code/Light.GuardClauses.Tests/CommonAssertions/IsGreaterThanOrApproximatelyTests.cs b/Code/Light.GuardClauses.Tests/CommonAssertions/IsGreaterThanOrApproximatelyTests.cs
index 96ccedc..f855b87 100644
--- a/Code/Light.GuardClauses.Tests/CommonAssertions/IsGreaterThanOrApproximatelyTests.cs
+++ b/Code/Light.GuardClauses.Tests/CommonAssertions/IsGreaterThanOrApproximatelyTests.cs
@@ -37,7 +37,7 @@ public static void FloatWithDefaultTolerance(float first, float second, bool exp
public static void FloatWIthCustomTolerance(float first, float second, float tolerance, bool expected) =>
first.IsGreaterThanOrApproximately(second, tolerance).Should().Be(expected);
-#if NET8_0
+#if NET8_0_OR_GREATER
[Theory]
[InlineData(15.91, 15.9, 0.1, true)]
[InlineData(24.449, 24.45, 0.0001, false)]
diff --git a/Code/Light.GuardClauses.Tests/CommonAssertions/IsLessThanOrApproximatelyTests.cs b/Code/Light.GuardClauses.Tests/CommonAssertions/IsLessThanOrApproximatelyTests.cs
index 6e774b8..5822182 100644
--- a/Code/Light.GuardClauses.Tests/CommonAssertions/IsLessThanOrApproximatelyTests.cs
+++ b/Code/Light.GuardClauses.Tests/CommonAssertions/IsLessThanOrApproximatelyTests.cs
@@ -37,7 +37,7 @@ public static void FloatWithDefaultTolerance(float first, float second, bool exp
public static void FloatWithCustomTolerance(float first, float second, float tolerance, bool expected) =>
first.IsLessThanOrApproximately(second, tolerance).Should().Be(expected);
-#if NET8_0
+#if NET8_0_OR_GREATER
[Theory]
[InlineData(13.25, 13.5, 0.1, true)] // Less than case
[InlineData(13.5, 13.5, 0.1, true)] // Equal case
diff --git a/Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeApproximatelyTests.cs b/Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeApproximatelyTests.cs
index 3204655..20e87f2 100644
--- a/Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeApproximatelyTests.cs
+++ b/Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeApproximatelyTests.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using FluentAssertions;
using Xunit;
@@ -178,7 +178,7 @@ public static void CallerArgumentExpressionWithTolerance_Float()
.WithParameterName(nameof(pi));
}
-#if NET8_0
+#if NET8_0_OR_GREATER
[Theory]
[InlineData(5.1, 5.0, 0.2)]
[InlineData(10.3, 10.3, 0.01)]
diff --git a/Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeGreaterThanOrApproximatelyTests.cs b/Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeGreaterThanOrApproximatelyTests.cs
index ff19f60..5a76566 100644
--- a/Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeGreaterThanOrApproximatelyTests.cs
+++ b/Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeGreaterThanOrApproximatelyTests.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using FluentAssertions;
using Xunit;
@@ -202,7 +202,7 @@ public static void CallerArgumentExpressionWithTolerance_Float()
.WithParameterName(nameof(pi));
}
-#if NET8_0
+#if NET8_0_OR_GREATER
[Theory]
[InlineData(15.91, 15.9, 0.1)]
[InlineData(24.4999, 24.45, 0.0001)]
diff --git a/Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeLessThanOrApproximatelyTests.cs b/Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeLessThanOrApproximatelyTests.cs
index 9eace40..25c7f1b 100644
--- a/Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeLessThanOrApproximatelyTests.cs
+++ b/Code/Light.GuardClauses.Tests/ComparableAssertions/MustBeLessThanOrApproximatelyTests.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using FluentAssertions;
using Xunit;
@@ -202,7 +202,7 @@ public static void CallerArgumentExpressionWithTolerance_Float()
.WithParameterName(nameof(threePointFive));
}
-#if NET8_0
+#if NET8_0_OR_GREATER
[Theory]
[InlineData(15.9, 15.91, 0.1)]
[InlineData(24.45, 24.4999, 0.0001)]
diff --git a/Code/Light.GuardClauses.Tests/ComparableAssertions/MustNotBeApproximatelyTests.cs b/Code/Light.GuardClauses.Tests/ComparableAssertions/MustNotBeApproximatelyTests.cs
index da9e7ea..5276492 100644
--- a/Code/Light.GuardClauses.Tests/ComparableAssertions/MustNotBeApproximatelyTests.cs
+++ b/Code/Light.GuardClauses.Tests/ComparableAssertions/MustNotBeApproximatelyTests.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using FluentAssertions;
using Xunit;
@@ -180,7 +180,7 @@ public static void CallerArgumentExpressionWithTolerance_Float()
.WithParameterName(nameof(pi));
}
-#if NET8_0
+#if NET8_0_OR_GREATER
[Theory]
[InlineData(5.3, 5.0, 0.2)]
[InlineData(10.4, 10.3, 0.01)]
diff --git a/Code/Light.GuardClauses.Tests/StringAssertions/IsEmailAddressTests.cs b/Code/Light.GuardClauses.Tests/StringAssertions/IsEmailAddressTests.cs
index 0cd3750..c252cbf 100644
--- a/Code/Light.GuardClauses.Tests/StringAssertions/IsEmailAddressTests.cs
+++ b/Code/Light.GuardClauses.Tests/StringAssertions/IsEmailAddressTests.cs
@@ -24,7 +24,7 @@ public void IsValidEmailAddress(string email)
isValid.Should().BeTrue();
}
-#if NET8_0
+#if NET8_0_OR_GREATER
[Theory]
[ClassData(typeof(InvalidEmailAddressesWithNull))]
public void IsNotValidEmailAddress_ReadOnlySpan(string email)
diff --git a/Code/Light.GuardClauses.Tests/StringAssertions/MustBeEmailAddressTests.cs b/Code/Light.GuardClauses.Tests/StringAssertions/MustBeEmailAddressTests.cs
index f6d1314..81c4c61 100644
--- a/Code/Light.GuardClauses.Tests/StringAssertions/MustBeEmailAddressTests.cs
+++ b/Code/Light.GuardClauses.Tests/StringAssertions/MustBeEmailAddressTests.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Text.RegularExpressions;
using FluentAssertions;
using Light.GuardClauses.Exceptions;
@@ -124,7 +124,7 @@ public static void CallerArgumentExpression()
.WithParameterName(nameof(email));
}
-#if NET8_0
+#if NET8_0_OR_GREATER
[Theory]
[ClassData(typeof(ValidEmailAddresses))]
public static void ValidEmailAddress_ReadOnlySpan(string email)
diff --git a/Code/Light.GuardClauses/CallerArgumentExpressionAttribute.cs b/Code/Light.GuardClauses/CallerArgumentExpressionAttribute.cs
index f5df610..274950d 100644
--- a/Code/Light.GuardClauses/CallerArgumentExpressionAttribute.cs
+++ b/Code/Light.GuardClauses/CallerArgumentExpressionAttribute.cs
@@ -1,4 +1,4 @@
-#if !NET8_0
+#if !NET8_0_OR_GREATER
// ReSharper disable once CheckNamespace -- CallerArgumentExpression must be in exactly this namespace
namespace System.Runtime.CompilerServices;
diff --git a/Code/Light.GuardClauses/Check.DerivesFrom.cs b/Code/Light.GuardClauses/Check.DerivesFrom.cs
index 8be3fd3..bd07dc3 100644
--- a/Code/Light.GuardClauses/Check.DerivesFrom.cs
+++ b/Code/Light.GuardClauses/Check.DerivesFrom.cs
@@ -1,4 +1,4 @@
-#if NET8_0
+#if NET8_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using System;
diff --git a/Code/Light.GuardClauses/Check.Implements.cs b/Code/Light.GuardClauses/Check.Implements.cs
index e0643d4..55262ac 100644
--- a/Code/Light.GuardClauses/Check.Implements.cs
+++ b/Code/Light.GuardClauses/Check.Implements.cs
@@ -1,4 +1,4 @@
-#if NET8_0
+#if NET8_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using System;
@@ -21,7 +21,7 @@ public static partial class Check
/// Thrown when or is null.
[ContractAnnotation("type:null => halt; interfaceType:null => halt")]
public static bool Implements(
-#if NET8_0
+#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)]
#endif
[NotNull] [ValidatedNotNull] this Type type,
@@ -53,7 +53,7 @@ [NotNull] [ValidatedNotNull] Type interfaceType
/// Thrown when , or , or is null.
[ContractAnnotation("type:null => halt; interfaceType:null => halt; typeComparer:null => halt")]
public static bool Implements(
-#if NET8_0
+#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)]
#endif
[NotNull] [ValidatedNotNull] this Type type,
diff --git a/Code/Light.GuardClauses/Check.InheritsFrom.cs b/Code/Light.GuardClauses/Check.InheritsFrom.cs
index 6e2ad44..30403f5 100644
--- a/Code/Light.GuardClauses/Check.InheritsFrom.cs
+++ b/Code/Light.GuardClauses/Check.InheritsFrom.cs
@@ -1,4 +1,4 @@
-#if NET8_0
+#if NET8_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using System;
@@ -23,7 +23,7 @@ public static partial class Check
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[ContractAnnotation("type:null => halt; baseClassOrInterfaceType:null => halt")]
public static bool InheritsFrom(
-#if NET8_0
+#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)]
#endif
[NotNull] [ValidatedNotNull] this Type type,
@@ -46,7 +46,7 @@ [NotNull] [ValidatedNotNull] Type baseClassOrInterfaceType
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[ContractAnnotation("type:null => halt; baseClassOrInterfaceType:null => halt; typeComparer:null => halt")]
public static bool InheritsFrom(
-#if NET8_0
+#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)]
#endif
[NotNull] [ValidatedNotNull] this Type type,
diff --git a/Code/Light.GuardClauses/Check.IsApproximately.cs b/Code/Light.GuardClauses/Check.IsApproximately.cs
index 02ef101..5d6308f 100644
--- a/Code/Light.GuardClauses/Check.IsApproximately.cs
+++ b/Code/Light.GuardClauses/Check.IsApproximately.cs
@@ -1,6 +1,6 @@
-using System;
+using System;
using System.Runtime.CompilerServices;
-#if NET8_0
+#if NET8_0_OR_GREATER
using System.Numerics;
#endif
@@ -62,7 +62,7 @@ public static bool IsApproximately(this float value, float other, float toleranc
public static bool IsApproximately(this float value, float other) =>
Math.Abs(value - other) <= 0.0001f;
-#if NET8_0
+#if NET8_0_OR_GREATER
///
/// Checks if the specified value is approximately the same as the other value, using the given tolerance.
///
diff --git a/Code/Light.GuardClauses/Check.IsEmailAddress.cs b/Code/Light.GuardClauses/Check.IsEmailAddress.cs
index 396e2fd..d795937 100644
--- a/Code/Light.GuardClauses/Check.IsEmailAddress.cs
+++ b/Code/Light.GuardClauses/Check.IsEmailAddress.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
@@ -29,7 +29,7 @@ public static bool IsEmailAddress([NotNullWhen(true)] this string? emailAddress)
public static bool IsEmailAddress([NotNullWhen(true)] this string? emailAddress, Regex emailAddressPattern) =>
emailAddress != null && emailAddressPattern.MustNotBeNull(nameof(emailAddressPattern)).IsMatch(emailAddress);
-#if NET8_0
+#if NET8_0_OR_GREATER
///
/// Checks if the specified span is an email address using the default email regular expression
/// defined in .
diff --git a/Code/Light.GuardClauses/Check.IsGreaterThanOrApproximately.cs b/Code/Light.GuardClauses/Check.IsGreaterThanOrApproximately.cs
index 487540b..a04ec86 100644
--- a/Code/Light.GuardClauses/Check.IsGreaterThanOrApproximately.cs
+++ b/Code/Light.GuardClauses/Check.IsGreaterThanOrApproximately.cs
@@ -1,5 +1,5 @@
-using System.Runtime.CompilerServices;
-#if NET8_0
+using System.Runtime.CompilerServices;
+#if NET8_0_OR_GREATER
using System.Numerics;
#endif
@@ -61,7 +61,7 @@ public static bool IsGreaterThanOrApproximately(this float value, float other, f
public static bool IsGreaterThanOrApproximately(this float value, float other) =>
value > other || value.IsApproximately(other);
-#if NET8_0
+#if NET8_0_OR_GREATER
///
/// Checks if the specified value is greater than or approximately the same as the other value, using the given tolerance.
///
diff --git a/Code/Light.GuardClauses/Check.IsLessThanOrApproximately.cs b/Code/Light.GuardClauses/Check.IsLessThanOrApproximately.cs
index 89b109b..50ed29b 100644
--- a/Code/Light.GuardClauses/Check.IsLessThanOrApproximately.cs
+++ b/Code/Light.GuardClauses/Check.IsLessThanOrApproximately.cs
@@ -1,5 +1,5 @@
-using System.Runtime.CompilerServices;
-#if NET8_0
+using System.Runtime.CompilerServices;
+#if NET8_0_OR_GREATER
using System.Numerics;
#endif
@@ -61,7 +61,7 @@ public static bool IsLessThanOrApproximately(this float value, float other, floa
public static bool IsLessThanOrApproximately(this float value, float other) =>
value < other || value.IsApproximately(other);
-#if NET8_0
+#if NET8_0_OR_GREATER
///
/// Checks if the specified value is less than or approximately the same as the other value, using the given tolerance.
///
diff --git a/Code/Light.GuardClauses/Check.IsOpenConstructedGenericType.cs b/Code/Light.GuardClauses/Check.IsOpenConstructedGenericType.cs
index 7d8348e..bb7d462 100644
--- a/Code/Light.GuardClauses/Check.IsOpenConstructedGenericType.cs
+++ b/Code/Light.GuardClauses/Check.IsOpenConstructedGenericType.cs
@@ -1,4 +1,4 @@
-#if NET8_0
+#if NET8_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using System;
diff --git a/Code/Light.GuardClauses/Check.IsOrDerivesFrom.cs b/Code/Light.GuardClauses/Check.IsOrDerivesFrom.cs
index ed74bee..3152886 100644
--- a/Code/Light.GuardClauses/Check.IsOrDerivesFrom.cs
+++ b/Code/Light.GuardClauses/Check.IsOrDerivesFrom.cs
@@ -1,4 +1,4 @@
-#if NET8_0
+#if NET8_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using System;
diff --git a/Code/Light.GuardClauses/Check.IsOrImplements.cs b/Code/Light.GuardClauses/Check.IsOrImplements.cs
index aea0e10..ec096a2 100644
--- a/Code/Light.GuardClauses/Check.IsOrImplements.cs
+++ b/Code/Light.GuardClauses/Check.IsOrImplements.cs
@@ -1,4 +1,4 @@
-#if NET8_0
+#if NET8_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using System;
@@ -23,7 +23,7 @@ public static partial class Check
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[ContractAnnotation("type:null => halt; otherType:null => halt")]
public static bool IsOrImplements(
-#if NET8_0
+#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)]
#endif
[NotNull] [ValidatedNotNull] this Type type,
@@ -43,7 +43,7 @@ [NotNull] [ValidatedNotNull] Type otherType
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[ContractAnnotation("type:null => halt; otherType:null => halt")]
public static bool IsOrImplements(
-#if NET8_0
+#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)]
#endif
[NotNull] [ValidatedNotNull] this Type type,
diff --git a/Code/Light.GuardClauses/Check.IsOrInheritsFrom.cs b/Code/Light.GuardClauses/Check.IsOrInheritsFrom.cs
index 62549f4..754ad60 100644
--- a/Code/Light.GuardClauses/Check.IsOrInheritsFrom.cs
+++ b/Code/Light.GuardClauses/Check.IsOrInheritsFrom.cs
@@ -1,4 +1,4 @@
-#if NET8_0
+#if NET8_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
using System;
@@ -24,7 +24,7 @@ public static partial class Check
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[ContractAnnotation("type:null => halt; otherType:null => halt")]
public static bool IsOrInheritsFrom(
-#if NET8_0
+#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)]
#endif
[NotNull] [ValidatedNotNull] this Type type,
@@ -44,7 +44,7 @@ [NotNull] [ValidatedNotNull] Type otherType
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[ContractAnnotation("type:null => halt; otherType:null => halt; typeComparer:null => halt")]
public static bool IsOrInheritsFrom(
-#if NET8_0
+#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)]
#endif
[NotNull] [ValidatedNotNull] this Type type,
diff --git a/Code/Light.GuardClauses/Check.MustBeApproximately.cs b/Code/Light.GuardClauses/Check.MustBeApproximately.cs
index 77bdf05..effb46a 100644
--- a/Code/Light.GuardClauses/Check.MustBeApproximately.cs
+++ b/Code/Light.GuardClauses/Check.MustBeApproximately.cs
@@ -1,7 +1,7 @@
-using System;
+using System;
using System.Runtime.CompilerServices;
using Light.GuardClauses.ExceptionFactory;
-#if NET8_0
+#if NET8_0_OR_GREATER
using System.Numerics;
#endif
@@ -232,7 +232,7 @@ Func exceptionFactory
return parameter;
}
-#if NET8_0
+#if NET8_0_OR_GREATER
///
/// Ensures that the specified is approximately equal to the given
/// value, or otherwise throws an .
diff --git a/Code/Light.GuardClauses/Check.MustBeEmailAddress.cs b/Code/Light.GuardClauses/Check.MustBeEmailAddress.cs
index 8cd52c7..cf7f1e5 100644
--- a/Code/Light.GuardClauses/Check.MustBeEmailAddress.cs
+++ b/Code/Light.GuardClauses/Check.MustBeEmailAddress.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using JetBrains.Annotations;
@@ -109,7 +109,7 @@ public static string MustBeEmailAddress(
return parameter;
}
-#if NET8_0
+#if NET8_0_OR_GREATER
///
/// Ensures that the span represents a valid email address using the default email regular expression
/// defined in , or otherwise throws an .
diff --git a/Code/Light.GuardClauses/Check.MustBeGreaterThanOrApproximately.cs b/Code/Light.GuardClauses/Check.MustBeGreaterThanOrApproximately.cs
index a0cd395..0314912 100644
--- a/Code/Light.GuardClauses/Check.MustBeGreaterThanOrApproximately.cs
+++ b/Code/Light.GuardClauses/Check.MustBeGreaterThanOrApproximately.cs
@@ -1,7 +1,7 @@
-using System;
+using System;
using System.Runtime.CompilerServices;
using Light.GuardClauses.ExceptionFactory;
-#if NET8_0
+#if NET8_0_OR_GREATER
using System.Numerics;
#endif
@@ -227,7 +227,7 @@ Func exceptionFactory
return parameter;
}
-#if NET8_0
+#if NET8_0_OR_GREATER
///
/// Ensures that the specified is greater than or approximately equal to the given
/// value, or otherwise throws an .
diff --git a/Code/Light.GuardClauses/Check.MustBeLessThanOrApproximately.cs b/Code/Light.GuardClauses/Check.MustBeLessThanOrApproximately.cs
index f48bf5d..2b6e3e6 100644
--- a/Code/Light.GuardClauses/Check.MustBeLessThanOrApproximately.cs
+++ b/Code/Light.GuardClauses/Check.MustBeLessThanOrApproximately.cs
@@ -1,7 +1,7 @@
-using System;
+using System;
using System.Runtime.CompilerServices;
using Light.GuardClauses.ExceptionFactory;
-#if NET8_0
+#if NET8_0_OR_GREATER
using System.Numerics;
#endif
@@ -227,7 +227,7 @@ Func exceptionFactory
return parameter;
}
-#if NET8_0
+#if NET8_0_OR_GREATER
///
/// Ensures that the specified is less than or approximately equal to the given
/// value, or otherwise throws an .
diff --git a/Code/Light.GuardClauses/Check.MustNotBeApproximately.cs b/Code/Light.GuardClauses/Check.MustNotBeApproximately.cs
index 909ffe0..fa62386 100644
--- a/Code/Light.GuardClauses/Check.MustNotBeApproximately.cs
+++ b/Code/Light.GuardClauses/Check.MustNotBeApproximately.cs
@@ -1,7 +1,7 @@
-using System;
+using System;
using System.Runtime.CompilerServices;
using Light.GuardClauses.ExceptionFactory;
-#if NET8_0
+#if NET8_0_OR_GREATER
using System.Numerics;
#endif
@@ -232,7 +232,7 @@ Func exceptionFactory
return parameter;
}
-#if NET8_0
+#if NET8_0_OR_GREATER
///
/// Ensures that the specified is not approximately equal to the given
/// value, or otherwise throws an .
diff --git a/Code/Light.GuardClauses/EnumInfo.cs b/Code/Light.GuardClauses/EnumInfo.cs
index 49232e9..d19b156 100644
--- a/Code/Light.GuardClauses/EnumInfo.cs
+++ b/Code/Light.GuardClauses/EnumInfo.cs
@@ -35,7 +35,7 @@ public static class EnumInfo where T : struct, Enum
static EnumInfo()
{
-#if NET8_0
+#if NET8_0_OR_GREATER
EnumConstantsArray = Enum.GetValues();
#else
EnumConstantsArray = (T[]) Enum.GetValues(typeof(T));
diff --git a/Code/Light.GuardClauses/Exceptions/AbsoluteUriException.cs b/Code/Light.GuardClauses/Exceptions/AbsoluteUriException.cs
index 5d105ac..3e7ee49 100644
--- a/Code/Light.GuardClauses/Exceptions/AbsoluteUriException.cs
+++ b/Code/Light.GuardClauses/Exceptions/AbsoluteUriException.cs
@@ -16,7 +16,7 @@ public class AbsoluteUriException : UriException
/// The message of the exception (optional).
public AbsoluteUriException(string? parameterName = null, string? message = null) : base(parameterName, message) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected AbsoluteUriException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/ArgumentDefaultException.cs b/Code/Light.GuardClauses/Exceptions/ArgumentDefaultException.cs
index 7ca8b3b..c96991f 100644
--- a/Code/Light.GuardClauses/Exceptions/ArgumentDefaultException.cs
+++ b/Code/Light.GuardClauses/Exceptions/ArgumentDefaultException.cs
@@ -16,7 +16,7 @@ public class ArgumentDefaultException : ArgumentException
/// The message of the exception (optional).
public ArgumentDefaultException(string? parameterName = null, string? message = null) : base(message, parameterName) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected ArgumentDefaultException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/CollectionException.cs b/Code/Light.GuardClauses/Exceptions/CollectionException.cs
index f585e4c..5d1a8de 100644
--- a/Code/Light.GuardClauses/Exceptions/CollectionException.cs
+++ b/Code/Light.GuardClauses/Exceptions/CollectionException.cs
@@ -16,7 +16,7 @@ public class CollectionException : ArgumentException
/// The message of the exception (optional).
public CollectionException(string? parameterName = null, string? message = null) : base(message, parameterName) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected CollectionException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/EmptyCollectionException.cs b/Code/Light.GuardClauses/Exceptions/EmptyCollectionException.cs
index c08640b..a499ebc 100644
--- a/Code/Light.GuardClauses/Exceptions/EmptyCollectionException.cs
+++ b/Code/Light.GuardClauses/Exceptions/EmptyCollectionException.cs
@@ -16,7 +16,7 @@ public class EmptyCollectionException : InvalidCollectionCountException
/// The message of the exception (optional).
public EmptyCollectionException(string? parameterName = null, string? message = null) : base(parameterName, message) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected EmptyCollectionException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/EmptyGuidException.cs b/Code/Light.GuardClauses/Exceptions/EmptyGuidException.cs
index 64dd4c3..0ddb245 100644
--- a/Code/Light.GuardClauses/Exceptions/EmptyGuidException.cs
+++ b/Code/Light.GuardClauses/Exceptions/EmptyGuidException.cs
@@ -16,7 +16,7 @@ public class EmptyGuidException : ArgumentException
/// The message of the exception (optional).
public EmptyGuidException(string? parameterName = null, string? message = null) : base(message, parameterName) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected EmptyGuidException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/EmptyStringException.cs b/Code/Light.GuardClauses/Exceptions/EmptyStringException.cs
index 4b37349..a7a41f7 100644
--- a/Code/Light.GuardClauses/Exceptions/EmptyStringException.cs
+++ b/Code/Light.GuardClauses/Exceptions/EmptyStringException.cs
@@ -16,7 +16,7 @@ public class EmptyStringException : StringException
/// The message of the exception (optional).
public EmptyStringException(string? parameterName = null, string? message = null) : base(parameterName, message) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected EmptyStringException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/EnumValueNotDefinedException.cs b/Code/Light.GuardClauses/Exceptions/EnumValueNotDefinedException.cs
index ec2c375..8f536db 100644
--- a/Code/Light.GuardClauses/Exceptions/EnumValueNotDefinedException.cs
+++ b/Code/Light.GuardClauses/Exceptions/EnumValueNotDefinedException.cs
@@ -16,7 +16,7 @@ public class EnumValueNotDefinedException : ArgumentException
/// The message of the exception.
public EnumValueNotDefinedException(string? parameterName = null, string? message = null) : base(message, parameterName) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected EnumValueNotDefinedException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/ExistingItemException.cs b/Code/Light.GuardClauses/Exceptions/ExistingItemException.cs
index 52f0104..3e5809d 100644
--- a/Code/Light.GuardClauses/Exceptions/ExistingItemException.cs
+++ b/Code/Light.GuardClauses/Exceptions/ExistingItemException.cs
@@ -16,7 +16,7 @@ public class ExistingItemException : CollectionException
/// The message of the exception (optional).
public ExistingItemException(string? parameterName = null, string? message = null) : base(parameterName, message) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected ExistingItemException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/InvalidCollectionCountException.cs b/Code/Light.GuardClauses/Exceptions/InvalidCollectionCountException.cs
index 70835f3..95bd5be 100644
--- a/Code/Light.GuardClauses/Exceptions/InvalidCollectionCountException.cs
+++ b/Code/Light.GuardClauses/Exceptions/InvalidCollectionCountException.cs
@@ -16,7 +16,7 @@ public class InvalidCollectionCountException : CollectionException
/// The message of the exception (optional).
public InvalidCollectionCountException(string? parameterName = null, string? message = null) : base(parameterName, message) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected InvalidCollectionCountException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/InvalidConfigurationException.cs b/Code/Light.GuardClauses/Exceptions/InvalidConfigurationException.cs
index 110f48d..4883a8f 100644
--- a/Code/Light.GuardClauses/Exceptions/InvalidConfigurationException.cs
+++ b/Code/Light.GuardClauses/Exceptions/InvalidConfigurationException.cs
@@ -16,7 +16,7 @@ public class InvalidConfigurationException : Exception
/// The exception that is the cause of this one (optional).
public InvalidConfigurationException(string? message = null, Exception? innerException = null) : base(message, innerException) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected InvalidConfigurationException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/InvalidDateTimeException.cs b/Code/Light.GuardClauses/Exceptions/InvalidDateTimeException.cs
index 867f5ae..28605dc 100644
--- a/Code/Light.GuardClauses/Exceptions/InvalidDateTimeException.cs
+++ b/Code/Light.GuardClauses/Exceptions/InvalidDateTimeException.cs
@@ -16,7 +16,7 @@ public class InvalidDateTimeException : ArgumentException
/// The message of the exception (optional).
public InvalidDateTimeException(string? parameterName = null, string? message = null) : base(message, parameterName) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected InvalidDateTimeException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/InvalidEmailAddressException.cs b/Code/Light.GuardClauses/Exceptions/InvalidEmailAddressException.cs
index bef57a3..23dff0c 100644
--- a/Code/Light.GuardClauses/Exceptions/InvalidEmailAddressException.cs
+++ b/Code/Light.GuardClauses/Exceptions/InvalidEmailAddressException.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Runtime.Serialization;
namespace Light.GuardClauses.Exceptions;
@@ -16,7 +16,7 @@ public class InvalidEmailAddressException : StringException
/// The message of the exception (optional).
public InvalidEmailAddressException(string? parameterName = null, string? message = null) : base(parameterName, message) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected InvalidEmailAddressException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/InvalidStateException.cs b/Code/Light.GuardClauses/Exceptions/InvalidStateException.cs
index 9556d50..e6a86dd 100644
--- a/Code/Light.GuardClauses/Exceptions/InvalidStateException.cs
+++ b/Code/Light.GuardClauses/Exceptions/InvalidStateException.cs
@@ -16,7 +16,7 @@ public class InvalidStateException : Exception
/// The exception that is the cause of this one (optional).
public InvalidStateException(string? message = null, Exception? innerException = null) : base(message, innerException) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected InvalidStateException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/InvalidUriSchemeException.cs b/Code/Light.GuardClauses/Exceptions/InvalidUriSchemeException.cs
index 60a5b5a..7504457 100644
--- a/Code/Light.GuardClauses/Exceptions/InvalidUriSchemeException.cs
+++ b/Code/Light.GuardClauses/Exceptions/InvalidUriSchemeException.cs
@@ -16,7 +16,7 @@ public class InvalidUriSchemeException : UriException
/// The message of the exception (optional).
public InvalidUriSchemeException(string? parameterName = null, string? message = null) : base(parameterName, message) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected InvalidUriSchemeException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/MissingItemException.cs b/Code/Light.GuardClauses/Exceptions/MissingItemException.cs
index b0c8358..78ab68b 100644
--- a/Code/Light.GuardClauses/Exceptions/MissingItemException.cs
+++ b/Code/Light.GuardClauses/Exceptions/MissingItemException.cs
@@ -16,7 +16,7 @@ public class MissingItemException : CollectionException
/// The message of the exception (optional).
public MissingItemException(string? parameterName = null, string? message = null) : base(parameterName, message) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected MissingItemException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/NullableHasNoValueException.cs b/Code/Light.GuardClauses/Exceptions/NullableHasNoValueException.cs
index 23cb4d9..4dc1ea7 100644
--- a/Code/Light.GuardClauses/Exceptions/NullableHasNoValueException.cs
+++ b/Code/Light.GuardClauses/Exceptions/NullableHasNoValueException.cs
@@ -16,7 +16,7 @@ public class NullableHasNoValueException : ArgumentException
/// The message of the exception (optional).
public NullableHasNoValueException(string? parameterName = null, string? message = null) : base(message, parameterName) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected NullableHasNoValueException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/RelativeUriException.cs b/Code/Light.GuardClauses/Exceptions/RelativeUriException.cs
index f8d2a9d..0e57847 100644
--- a/Code/Light.GuardClauses/Exceptions/RelativeUriException.cs
+++ b/Code/Light.GuardClauses/Exceptions/RelativeUriException.cs
@@ -16,7 +16,7 @@ public class RelativeUriException : UriException
/// The message of the exception (optional).
public RelativeUriException(string? parameterName = null, string? message = null) : base(parameterName, message) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected RelativeUriException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/SameObjectReferenceException.cs b/Code/Light.GuardClauses/Exceptions/SameObjectReferenceException.cs
index 378d57c..82a8ec7 100644
--- a/Code/Light.GuardClauses/Exceptions/SameObjectReferenceException.cs
+++ b/Code/Light.GuardClauses/Exceptions/SameObjectReferenceException.cs
@@ -16,7 +16,7 @@ public class SameObjectReferenceException : ArgumentException
/// The message of the exception (optional).
public SameObjectReferenceException(string? parameterName = null, string? message = null) : base(message, parameterName) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected SameObjectReferenceException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/StringDoesNotMatchException.cs b/Code/Light.GuardClauses/Exceptions/StringDoesNotMatchException.cs
index c7fc2c0..684dc6c 100644
--- a/Code/Light.GuardClauses/Exceptions/StringDoesNotMatchException.cs
+++ b/Code/Light.GuardClauses/Exceptions/StringDoesNotMatchException.cs
@@ -16,7 +16,7 @@ public class StringDoesNotMatchException : StringException
/// The message of the exception (optional).
public StringDoesNotMatchException(string? parameterName = null, string? message = null) : base(parameterName, message) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected StringDoesNotMatchException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/StringException.cs b/Code/Light.GuardClauses/Exceptions/StringException.cs
index 9e3d42f..f76d72c 100644
--- a/Code/Light.GuardClauses/Exceptions/StringException.cs
+++ b/Code/Light.GuardClauses/Exceptions/StringException.cs
@@ -16,7 +16,7 @@ public class StringException : ArgumentException
/// The message of the exception (optional).
public StringException(string? parameterName = null, string? message = null) : base(message, parameterName) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected StringException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/StringLengthException.cs b/Code/Light.GuardClauses/Exceptions/StringLengthException.cs
index f728b59..ed34616 100644
--- a/Code/Light.GuardClauses/Exceptions/StringLengthException.cs
+++ b/Code/Light.GuardClauses/Exceptions/StringLengthException.cs
@@ -16,7 +16,7 @@ public class StringLengthException : StringException
/// The message of the exception (optional).
public StringLengthException(string? parameterName = null, string? message = null) : base(parameterName, message) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected StringLengthException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/SubstringException.cs b/Code/Light.GuardClauses/Exceptions/SubstringException.cs
index 862dbe5..310d6cc 100644
--- a/Code/Light.GuardClauses/Exceptions/SubstringException.cs
+++ b/Code/Light.GuardClauses/Exceptions/SubstringException.cs
@@ -16,7 +16,7 @@ public class SubstringException : StringException
/// The message of the exception (optional).
public SubstringException(string? parameterName = null, string? message = null) : base(parameterName, message) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected SubstringException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/TypeCastException.cs b/Code/Light.GuardClauses/Exceptions/TypeCastException.cs
index acf5b88..eac4439 100644
--- a/Code/Light.GuardClauses/Exceptions/TypeCastException.cs
+++ b/Code/Light.GuardClauses/Exceptions/TypeCastException.cs
@@ -16,7 +16,7 @@ public class TypeCastException : ArgumentException
/// The message of the exception (optional).
public TypeCastException(string? parameterName = null, string? message = null) : base(message, parameterName) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected TypeCastException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/UriException.cs b/Code/Light.GuardClauses/Exceptions/UriException.cs
index 8486426..ec95efe 100644
--- a/Code/Light.GuardClauses/Exceptions/UriException.cs
+++ b/Code/Light.GuardClauses/Exceptions/UriException.cs
@@ -16,7 +16,7 @@ public class UriException : ArgumentException
/// The message of the exception (optional).
public UriException(string? parameterName = null, string? message = null) : base(message, parameterName) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected UriException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/ValueIsNotOneOfException.cs b/Code/Light.GuardClauses/Exceptions/ValueIsNotOneOfException.cs
index 61f60d4..f70bcfb 100644
--- a/Code/Light.GuardClauses/Exceptions/ValueIsNotOneOfException.cs
+++ b/Code/Light.GuardClauses/Exceptions/ValueIsNotOneOfException.cs
@@ -16,7 +16,7 @@ public class ValueIsNotOneOfException : ArgumentException
/// The message of the exception (optional).
public ValueIsNotOneOfException(string? parameterName = null, string? message = null) : base(message, parameterName) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected ValueIsNotOneOfException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/ValueIsOneOfException.cs b/Code/Light.GuardClauses/Exceptions/ValueIsOneOfException.cs
index 45b1f4e..25c19ef 100644
--- a/Code/Light.GuardClauses/Exceptions/ValueIsOneOfException.cs
+++ b/Code/Light.GuardClauses/Exceptions/ValueIsOneOfException.cs
@@ -16,7 +16,7 @@ public class ValueIsOneOfException : ArgumentException
/// The message of the exception (optional).
public ValueIsOneOfException(string? parameterName = null, string? message = null) : base(message, parameterName) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected ValueIsOneOfException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/ValuesEqualException.cs b/Code/Light.GuardClauses/Exceptions/ValuesEqualException.cs
index 0ec64a2..2a059bd 100644
--- a/Code/Light.GuardClauses/Exceptions/ValuesEqualException.cs
+++ b/Code/Light.GuardClauses/Exceptions/ValuesEqualException.cs
@@ -16,7 +16,7 @@ public class ValuesEqualException : ArgumentException
/// The message of the exception (optional).
public ValuesEqualException(string? parameterName = null, string? message = null) : base(message, parameterName) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected ValuesEqualException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/ValuesNotEqualException.cs b/Code/Light.GuardClauses/Exceptions/ValuesNotEqualException.cs
index 5c0bd89..22da3b4 100644
--- a/Code/Light.GuardClauses/Exceptions/ValuesNotEqualException.cs
+++ b/Code/Light.GuardClauses/Exceptions/ValuesNotEqualException.cs
@@ -16,7 +16,7 @@ public class ValuesNotEqualException : ArgumentException
/// The message of the exception (optional).
public ValuesNotEqualException(string? parameterName = null, string? message = null) : base(message, parameterName) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected ValuesNotEqualException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/Exceptions/WhiteSpaceStringException.cs b/Code/Light.GuardClauses/Exceptions/WhiteSpaceStringException.cs
index ea6700b..6a01ead 100644
--- a/Code/Light.GuardClauses/Exceptions/WhiteSpaceStringException.cs
+++ b/Code/Light.GuardClauses/Exceptions/WhiteSpaceStringException.cs
@@ -16,7 +16,7 @@ public class WhiteSpaceStringException : StringException
/// The message of the exception (optional).
public WhiteSpaceStringException(string? parameterName = null, string? message = null) : base(parameterName, message) { }
-#if !NET8_0
+#if !NET8_0_OR_GREATER
///
protected WhiteSpaceStringException(SerializationInfo info, StreamingContext context) : base(info, context) { }
#endif
diff --git a/Code/Light.GuardClauses/RegularExpressions.cs b/Code/Light.GuardClauses/RegularExpressions.cs
index 238f17c..dad138f 100644
--- a/Code/Light.GuardClauses/RegularExpressions.cs
+++ b/Code/Light.GuardClauses/RegularExpressions.cs
@@ -5,7 +5,7 @@ namespace Light.GuardClauses;
///
/// Provides regular expressions that are used in string assertions.
///
-#if NET8_0
+#if NET8_0_OR_GREATER
public static partial class RegularExpressions
#else
public static class RegularExpressions
@@ -24,7 +24,7 @@ public static class RegularExpressions
/// was modified to satisfy all tests of https://blogs.msdn.microsoft.com/testing123/2009/02/06/email-address-test-cases/.
///
public static readonly Regex EmailRegex =
-#if NET8_0
+#if NET8_0_OR_GREATER
GenerateEmailRegex();
[GeneratedRegex(EmailRegexText, RegexOptions.ECMAScript | RegexOptions.CultureInvariant)]