Rect.Equality(Rect, Rect) 操作员
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
比较两 Rect 个结构是否相等。
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 ( = ) : Windows.Foundation.Rect * Windows.Foundation.Rect -> bool
Public Shared Operator == (rect1 As Rect, rect2 As Rect) As Boolean
参数
- rect1
- Rect
要比较的第一个矩形。
- rect2
- Rect
要比较的第二个矩形。
返回
true
Rect如果结构具有相同的 x、y、width 和 height 属性值,则为 ;否则为 false。
注解
此结构表示 Windows 运行时 (WinRT) Rect结构的.NET投影。 有关详细信息,请参阅 UWP API 参考中的 Rect 。
有关此成员的详细信息和示例,请参阅 .NET Framework API 参考中的 Rect.Equality。 (示例显示WPF用法,可能不会直接转换为 UWP XAML。