Parcourir la source

Fixes #657 Pos implement Equals.

BDisp il y a 5 ans
Parent
commit
fbac5cb860
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      Terminal.Gui/Core/PosDim.cs

+ 5 - 0
Terminal.Gui/Core/PosDim.cs

@@ -178,6 +178,11 @@ namespace Terminal.Gui {
 			{
 				return n;
 			}
+
+			public override int GetHashCode () => n.GetHashCode ();
+
+			public override bool Equals (object other) => other is PosAbsolute abs && abs.n == n;
+
 		}
 
 		/// <summary>