Explorar el Código

Fixes #657 Pos implement Equals.

BDisp hace 5 años
padre
commit
fbac5cb860
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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>