Size.Equals 方法

定义

比较 Size 的实例与其他对象是否相等。Compares instances of Size and other objects for equality.

重载

Equals(Object)

比较某个对象与 Size 的实例是否相等。Compares an object to an instance of Size for equality.

Equals(Size)

比较某个值与 Size 的实例是否相等。Compares a value to an instance of Size for equality.

Equals(Size, Size)

比较 Size 的两个实例是否相等。Compares two instances of Size for equality.

Equals(Object)

比较某个对象与 Size 的实例是否相等。Compares an object to an instance of Size for equality.

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

参数

o
Object

要比较的 ObjectThe Object to compare.

返回

如果大小相等,则为 true;否则为 falsetrue if the sizes are equal; otherwise, false.

注解

Double 值在操作时可能导致错误。Double values can result in an error when operated upon. 逻辑上相等的值可能不会导致值 trueValues that are logically equal might fail to result in a value of true.

Equals(Size)

比较某个值与 Size 的实例是否相等。Compares a value to an instance of Size for equality.

public:
 bool Equals(System::Windows::Size value);
public bool Equals (System.Windows.Size value);
override this.Equals : System.Windows.Size -> bool
Public Function Equals (value As Size) As Boolean

参数

value
Size

要与此 Size 的当前实例进行比较的大小。The size to compare to this current instance of Size.

返回

如果 Size 的实例相等,则为 true;否则为 falsetrue if the instances of Size are equal; otherwise, false.

注解

Double 值在操作时可能导致错误。Double values can result in an error when operated upon. 逻辑上相等的值可能不会导致值 trueValues that are logically equal might fail to result in a value of true.

Equals(Size, Size)

比较 Size 的两个实例是否相等。Compares two instances of Size for equality.

public:
 static bool Equals(System::Windows::Size size1, System::Windows::Size size2);
public static bool Equals (System.Windows.Size size1, System.Windows.Size size2);
static member Equals : System.Windows.Size * System.Windows.Size -> bool
Public Shared Function Equals (size1 As Size, size2 As Size) As Boolean

参数

size1
Size

要比较的第一个 Size 实例。The first instance of Size to compare.

size2
Size

要比较的第二个 Size 实例。The second instance of Size to compare.

返回

如果 Size 的实例相等,则为 true;否则为 falsetrue if the instances of Size are equal; otherwise, false.

注解

Double 值在操作时可能导致错误。Double values can result in an error when operated upon. 逻辑上相等的值可能不会导致值 trueValues that are logically equal might fail to result in a value of true.

适用于