Fix PSMethodInvocationConstraints.GetHashCode method (#24965)

There is a difference between GetHashCode for array object itself and cumulative GetHashCode based on hashes of the array members.
This commit is contained in:
crazyjncsu
2025-02-13 09:31:05 +05:00
committed by GitHub
parent 6d6515b7e4
commit 14fb6f2618
@@ -2009,7 +2009,7 @@ namespace System.Management.Automation
}
public override int GetHashCode()
=> HashCode.Combine(MethodTargetType, ParameterTypes, GenericTypeParameters);
=> HashCode.Combine(MethodTargetType, ParameterTypes.SequenceGetHashCode(), GenericTypeParameters.SequenceGetHashCode());
public override string ToString()
{