System.Windows.Rect.Equals C# (CSharp) Method

Equals() public static method

public static Equals ( Rect rect1, Rect rect2 ) : bool
rect1 Rect
rect2 Rect
return bool
        public static bool Equals(Rect rect1, Rect rect2)
        {
            if (rect1.IsEmpty)
            {
                return rect2.IsEmpty;
            }
            return (((rect1.X.Equals(rect2.X) && rect1.Y.Equals(rect2.Y)) && rect1.Width.Equals(rect2.Width)) && rect1.Height.Equals(rect2.Height));
        }

Same methods

Rect::Equals ( Rect value ) : bool
Rect::Equals ( object o ) : bool

Usage Example

Example #1
0
 protected virtual bool DoesntContain(Rect rect, double otherStart, double otherEnd)
 {
     if (rect.Equals(Rect.Empty)) return true;
     double center = (otherStart + otherEnd)/2;
     if (center.IsInvalid()) return true;
     return center < start || center > end;
 }
All Usage Examples Of System.Windows.Rect::Equals