public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            QuantityUnits units = (QuantityUnits)obj;

            if (units.quanity < 0)
            {
                throw new QunaityMeasurementException(QunaityMeasurementException.ExceptionType.INVALID_VALUE, "provided value is invalid");
            }
            return(this.quanity == units.quanity);
        }
 public bool EqualityCheck(QuantityUnits firstQuantity, QuantityUnits secondQuantity)
 {
     return(firstQuantity.Equals(secondQuantity));
 }
 public double AddQuntities(QuantityUnits firstElement, QuantityUnits secondElement)
 {
     return(firstElement.AddQuantity(secondElement));
 }
 public double AddQuantity(QuantityUnits quantityUnits)
 {
     return(quantityUnits.quanity + this.quanity);
 }