return true;
}
+ public override bool Equals(object o)
+ {
+ if(o == null)
+ {
+ return false;
+ }
+ if(!(o is BaseHandle))
+ {
+ return false;
+ }
+ BaseHandle b = (BaseHandle)o;
+ if (!BaseHandle.ReferenceEquals(this, null) && !BaseHandle.ReferenceEquals(b, null))
+ {
+ // drop into native code to see if both handles point to the same body
+ return this.IsEqual(b);
+ }
+
+ if (BaseHandle.ReferenceEquals(this, null) && !BaseHandle.ReferenceEquals(b, null))
+ {
+ if (b.HasBody()) return false;
+ else return true;
+ }
+ if (!BaseHandle.ReferenceEquals(this, null) && BaseHandle.ReferenceEquals(b, null))
+ {
+ if (this.HasBody()) return false;
+ else return true;
+ }
+
+ return false;
+ }
+
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
public BaseHandle() : this(NDalicPINVOKE.new_BaseHandle__SWIG_1())
{
return !(a == b);
}
+ public override bool Equals(object o)
+ {
+ if(o == null)
+ {
+ return false;
+ }
+ if(!(o is PaddingType))
+ {
+ return false;
+ }
+ PaddingType p = (PaddingType)o;
+
+ // Return true if the fields match:
+ return (System.Math.Abs(Left - p.Left) < NDalic.GetRangedEpsilon(Left, p.Left)) &&
+ (System.Math.Abs(Right - p.Right) < NDalic.GetRangedEpsilon(Right, p.Right)) &&
+ (System.Math.Abs(Bottom - p.Bottom) < NDalic.GetRangedEpsilon(Bottom, p.Bottom)) &&
+ (System.Math.Abs(Top - p.Top) < NDalic.GetRangedEpsilon(Top, p.Top));
+ }
+
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
+
///< The Left value
public float Left
{
}
/// <summary>
- /// The Inequality operator.
+ /// Equality operator.
+ /// </summary>
+ /// <param name="o">The object to compare with the current object.</param>
+ /// <returns>True if boxes are exactly same.</returns>
+ public override bool Equals(object o)
+ {
+ if(o == null)
+ {
+ return false;
+ }
+ if(!(o is Rectangle))
+ {
+ return false;
+ }
+ Rectangle r = (Rectangle)o;
+
+ // Return true if the fields match:
+ return X == r.X && Y == r.Y && Width == r.Width && Height == r.Height;
+ }
+
+ /// <summary>
+ /// Serves as the default hash function.
+ /// </summary>
+ /// <returns>A hash code for the current object.</returns>
+ public override int GetHashCode()
+ {
+ return base.GetHashCode();
+ }
+
+ /// <summary>
+ /// Inequality operator.
/// </summary>
/// <param name="a">The first rectangle.</param>
/// <param name="b">The second rectangle.</param>