Selaa lähdekoodia

Fixes #657 Pos implement Equals.

BDisp 5 vuotta sitten
vanhempi
commit
fbac5cb860
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  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>