Skip to content

Commit

Permalink
Fix new code analysis warning
Browse files Browse the repository at this point in the history
Fix new code analysis warning identified in #334.
  • Loading branch information
martincostello committed Feb 14, 2024
1 parent d0a9861 commit c5fc817
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ProjectEuler/Maths.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ internal static bool IsAbundantNumber(long value)
internal static bool IsPandigital(long value, bool allowZero = false)
{
IReadOnlyList<int> digits = Digits(value);
IReadOnlyList<int> distinctDigits = digits.Distinct().ToArray();
int[] distinctDigits = digits.Distinct().ToArray();

if (digits.Count != distinctDigits.Count)
if (digits.Count != distinctDigits.Length)
{
return false;
}
Expand Down

0 comments on commit c5fc817

Please sign in to comment.