Ejemplo n.º 1
0
        /// <summary>
        /// Equals - compares this Int32Rect with the passed in object.  In this equality
        /// Double.NaN is equal to itself, unlike in numeric equality.
        /// Note that double values can acquire error when operated upon, such that
        /// an exact comparison between two values which
        /// are logically equal may fail.
        /// </summary>
        /// <returns>
        /// bool - true if the object is an instance of Int32Rect and if it's equal to "this".
        /// </returns>
        /// <param name='o'>The object to compare to "this"</param>
        public override bool Equals(object o)
        {
            if ((null == o) || !(o is Int32Rect))
            {
                return(false);
            }

            Int32Rect value = (Int32Rect)o;

            return(Int32Rect.Equals(this, value));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Equals - compares this Int32Rect with the passed in object.  In this equality
 /// Double.NaN is equal to itself, unlike in numeric equality.
 /// Note that double values can acquire error when operated upon, such that
 /// an exact comparison between two values which
 /// are logically equal may fail.
 /// </summary>
 /// <returns>
 /// bool - true if "value" is equal to "this".
 /// </returns>
 /// <param name='value'>The Int32Rect to compare to "this"</param>
 public bool Equals(Int32Rect value)
 {
     return(Int32Rect.Equals(this, value));
 }
Ejemplo n.º 3
0
		public static bool Equals (Int32Rect int32Rect1, Int32Rect int32Rect2)
		{
			return int32Rect1.Equals (int32Rect2);
		}
Ejemplo n.º 4
0
		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()));
		}
Ejemplo n.º 5
0
 public static bool Equals(Int32Rect int32Rect1, Int32Rect int32Rect2)
 {
     return(int32Rect1.Equals(int32Rect2));
 }