Skip to content

Commit 21ed23c

Browse files
authored
Try fix GetHashCode implementation of the Thickness struct is broken for uniform length (#8822)
* Try fix GetHashCode implementation of the Thickness struct is broken for uniform length #8789 * Use clean code.
1 parent 8fe6d4d commit 21ed23c

File tree

1 file changed

+1
-1
lines changed
  • src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows

1 file changed

+1
-1
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Thickness.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public bool Equals(Thickness thickness)
9595
/// <returns>Hash code</returns>
9696
public override int GetHashCode()
9797
{
98-
return _Left.GetHashCode() ^ _Top.GetHashCode() ^ _Right.GetHashCode() ^ _Bottom.GetHashCode();
98+
return System.HashCode.Combine(_Left, _Top, _Right, _Bottom);
9999
}
100100

101101
/// <summary>

0 commit comments

Comments
 (0)