From c5fc817071e0982e9bb1d7748e25d66ee71126bd Mon Sep 17 00:00:00 2001 From: martincostello Date: Wed, 14 Feb 2024 13:01:28 +0000 Subject: [PATCH] Fix new code analysis warning Fix new code analysis warning identified in #334. --- src/ProjectEuler/Maths.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ProjectEuler/Maths.cs b/src/ProjectEuler/Maths.cs index 1ea4b293..a72ac75d 100644 --- a/src/ProjectEuler/Maths.cs +++ b/src/ProjectEuler/Maths.cs @@ -238,9 +238,9 @@ internal static bool IsAbundantNumber(long value) internal static bool IsPandigital(long value, bool allowZero = false) { IReadOnlyList digits = Digits(value); - IReadOnlyList distinctDigits = digits.Distinct().ToArray(); + int[] distinctDigits = digits.Distinct().ToArray(); - if (digits.Count != distinctDigits.Count) + if (digits.Count != distinctDigits.Length) { return false; }