Browse Source

Fixes #657 Pos implement Equals.

BDisp 5 năm trước cách đây
mục cha
commit
fbac5cb860
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  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>