Ver código fonte

Fixes #657 Pos implement Equals.

BDisp 5 anos atrás
pai
commit
fbac5cb860
1 arquivos alterados com 5 adições e 0 exclusões
  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>