本文整理汇总了C#中System.Windows.Int32Rect.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# Int32Rect.Equals方法的具体用法?C# Int32Rect.Equals怎么用?C# Int32Rect.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Int32Rect
的用法示例。
在下文中一共展示了Int32Rect.Equals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Equals
public void Equals ()
{
Int32Rect r1 = new Int32Rect (1, 2, 3, 4);
Int32Rect r2 = r1;
Assert.IsTrue (r1.Equals (r1));
r2.X = 0;
Assert.IsFalse (r1.Equals (r2));
r2.X = r1.X;
r2.Y = 0;
Assert.IsFalse (r1.Equals (r2));
r2.Y = r1.Y;
r2.Width = 0;
Assert.IsFalse (r1.Equals (r2));
r2.Width = r1.Width;
r2.Height = 0;
Assert.IsFalse (r1.Equals (r2));
r2.Height = r1.Height;
Assert.IsFalse (r1.Equals (new object()));
}
示例2: Equals
public static bool Equals (Int32Rect int32Rect1, Int32Rect int32Rect2)
{
return int32Rect1.Equals (int32Rect2);
}