Skip to content

Commit

Permalink
Fix LINQ error in EqualityComparerHelperStrategyUtils (#171)
Browse files Browse the repository at this point in the history
Fixes a LINQ error that returned the `GetHashCode` method without
any parameters, but in the very next statements the parameters
of the first method found would be required.
  • Loading branch information
BBT-mmarkovic authored Nov 28, 2024
1 parent 97236df commit c409997
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public static Type GetCompareType<T>(IEqualityComparer<T> comparer)
return comparer
.GetType()
.GetMethods()
.First(x => x.Name == nameof(comparer.GetHashCode))
.First(x => x.Name == nameof(comparer.GetHashCode) && x.GetParameters().Length > 0)
.GetParameters()
.First()
.ParameterType;
Expand Down

0 comments on commit c409997

Please sign in to comment.