Size.Equals 方法

定义

重载

Equals(Size)

指示当前对象是否等于同一类型的另一个对象。Indicates whether the current object is equal to another object of the same type.

Equals(Object)

测试指定的对象是否为与此 Size 结构具有相同维度的 Size 结构。Tests to see whether the specified object is a Size structure with the same dimensions as this Size structure.

Equals(Size)

指示当前对象是否等于同一类型的另一个对象。Indicates whether the current object is equal to another object of the same type.

public:
 virtual bool Equals(System::Drawing::Size other);
public bool Equals (System.Drawing.Size other);
override this.Equals : System.Drawing.Size -> bool
Public Function Equals (other As Size) As Boolean

参数

other
Size

一个与此对象进行比较的对象。An object to compare with this object.

返回

Boolean

如果当前对象与 other 相同,则为 true;否则为 falsetrue if the current object is equal to other; otherwise, false.

实现

适用于

Equals(Object)

测试指定的对象是否为与此 Size 结构具有相同维度的 Size 结构。Tests to see whether the specified object is a Size structure with the same dimensions as this Size structure.

public:
 override bool Equals(System::Object ^ obj);
public override bool Equals (object obj);
override this.Equals : obj -> bool
Public Overrides Function Equals (obj As Object) As Boolean

参数

obj
Object

要测试的 ObjectThe Object to test.

返回

Boolean

如果 obj 是一个 Size 并与此 Size 具有相同的宽度和高度,则为 true;否则为 falsetrue if obj is a Size and has the same width and height as this Size; otherwise, false.

适用于