diff --git a/CommunityToolkit.HighPerformance/Enumerables/ReadOnlyRefEnumerable{T}.cs b/CommunityToolkit.HighPerformance/Enumerables/ReadOnlyRefEnumerable{T}.cs index 462b2a5c..d36fbd10 100644 --- a/CommunityToolkit.HighPerformance/Enumerables/ReadOnlyRefEnumerable{T}.cs +++ b/CommunityToolkit.HighPerformance/Enumerables/ReadOnlyRefEnumerable{T}.cs @@ -441,6 +441,7 @@ public readonly ref readonly T Current } } +#if NETSTANDARD2_1_OR_GREATER /// /// Throws an when the "length" parameter is invalid. /// @@ -456,6 +457,7 @@ private static void ThrowArgumentOutOfRangeExceptionForStep() { throw new ArgumentOutOfRangeException("step"); } +#endif /// /// Throws an when the target span is too short. diff --git a/CommunityToolkit.HighPerformance/Enumerables/RefEnumerable{T}.cs b/CommunityToolkit.HighPerformance/Enumerables/RefEnumerable{T}.cs index 4d86c3ef..71755689 100644 --- a/CommunityToolkit.HighPerformance/Enumerables/RefEnumerable{T}.cs +++ b/CommunityToolkit.HighPerformance/Enumerables/RefEnumerable{T}.cs @@ -529,6 +529,7 @@ public readonly ref T Current } } +#if NETSTANDARD2_1_OR_GREATER /// /// Throws an when the "length" parameter is invalid. /// @@ -544,6 +545,7 @@ private static void ThrowArgumentOutOfRangeExceptionForStep() { throw new ArgumentOutOfRangeException("step"); } +#endif /// /// Throws an when the target span is too short.