/// <summary> /// Compares two instance of Dt.Xls.GcSize for equality /// </summary> /// <param name="size1">A Dt.Xls.GcSize to compare</param> /// <param name="size2">A Dt.Xls.GcSize to compare</param> /// <returns>true if the two instance of Dt.Xls.GcSize are equal; otherwise, false.</returns> public static bool Equals(GcSize size1, GcSize size2) { if (size1.IsEmpty) { return(size2.IsEmpty); } return(((double)size1.Width).Equals(size2.Width) && ((double)size1.Height).Equals(size2.Height)); }
static GcSize() { GcSize size = new GcSize { _width = double.NegativeInfinity, _height = double.NegativeInfinity }; _empty = size; }
/// <summary> /// Compares an object to an instance of Dt.Xls.GcSize for equality /// </summary> /// <param name="obj">The System.Object to compare.</param> /// <returns>true is the sizes are equal; otherwise, false</returns> public override bool Equals(object obj) { if (obj == null) { return(false); } if (!(obj is GcSize)) { return(false); } GcSize size = (GcSize)obj; return(Equals(this, size)); }