Rectangle.Equality(Rectangle, Rectangle) 運算子

定義

測試兩個 Rectangle 結構是否具有相等的位置和大小。Tests whether two Rectangle structures have equal location and size.

public:
 static bool operator ==(System::Drawing::Rectangle left, System::Drawing::Rectangle right);
public static bool operator == (System.Drawing.Rectangle left, System.Drawing.Rectangle right);
static member ( = ) : System.Drawing.Rectangle * System.Drawing.Rectangle -> bool
Public Shared Operator == (left As Rectangle, right As Rectangle) As Boolean

參數

left
Rectangle

Rectangle 結構,位在等號比較運算子的左方。The Rectangle structure that is to the left of the equality operator.

right
Rectangle

Rectangle 結構,位在等號比較運算子的右方。The Rectangle structure that is to the right of the equality operator.

傳回

Boolean

如果兩個 Rectangle 結構具有相等的 XYWidthHeight 屬性,則這個運算子會傳回 trueThis operator returns true if the two Rectangle structures have equal X, Y, Width, and Height properties.

適用於