Rect.Inequality(Rect, Rect) 运算符

定义

比较两个 Rect 结构是否不相等。Compares two Rect structs for inequality.

public:
 static bool operator !=(Windows::Foundation::Rect rect1, Windows::Foundation::Rect rect2);
public static bool operator != (Windows.Foundation.Rect rect1, Windows.Foundation.Rect rect2);
static member op_Inequality : Windows.Foundation.Rect * Windows.Foundation.Rect -> bool
Public Shared Operator != (rect1 As Rect, rect2 As Rect) As Boolean

参数

rect1
Rect

要比较的第一个矩形。The first rectangle to compare.

rect2
Rect

要比较的第二个矩形。The second rectangle to compare.

返回

Boolean

如果 Rect 结构不具有相同的 x、y、宽度和高度属性值,则为 true;否则为 falsetrue if the Rect structs do not have the same x, y, width, and height property values; otherwise, false.

注解

此结构表示 Windows 运行时 (WinRT) 结构的 .NET 投影 RectThis struct represents the .NET projection of the Windows Runtime (WinRT) Rect struct. 有关详细信息,请参阅 UWP API 参考中的 RectFor more information, see Rect in the UWP API reference.

有关此成员的详细信息和示例,请参阅 Rect.Inequality .NET FRAMEWORK API 参考中的。For more information and examples of this member, see Rect.Inequality in the .NET Framework API reference. (示例演示 WPF 用法,可能无法直接转换为 UWP XAML。 ) (Examples show WPF usage and might not translate directly to UWP XAML.)

适用于