diff --git a/src/BBT.StructureTools/Compare/Helper/Strategy/EqualityComparerHelperStrategyUtils.cs b/src/BBT.StructureTools/Compare/Helper/Strategy/EqualityComparerHelperStrategyUtils.cs index 9b10cb1..a44c31b 100644 --- a/src/BBT.StructureTools/Compare/Helper/Strategy/EqualityComparerHelperStrategyUtils.cs +++ b/src/BBT.StructureTools/Compare/Helper/Strategy/EqualityComparerHelperStrategyUtils.cs @@ -122,7 +122,7 @@ public static Type GetCompareType(IEqualityComparer 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;