public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null || !this.GetType().Equals(obj.GetType())) { return(false); } QuantityOperation length = (QuantityOperation)obj; return(Double.Equals(length.unit.ConvertedValue(length.value), this.unit.ConvertedValue(this.value))); }
/// <summary> /// Adds the length. /// </summary> /// <param name="that">The that.</param> /// <returns>It Perform Addition Operation and return the converted value</returns> public QuantityOperation AddLength(QuantityOperation that) { return(new QuantityOperation(UnitConvertor.INCH, this.unit.ConvertedValue(this.value) + that.unit.ConvertedValue(that.value))); }