public bool TempConversion(QuantityMeasurement temp1, QuantityMeasurement temp2)
 {
     if (temp1.unit.Equals(Unit.FAHRENHEIT) && temp2.unit.Equals(Unit.CELSIUS))
     {
         return(((temp1.value - 32) * 5 / 9).CompareTo(temp2.value) == 0);
     }
     else if (temp1.unit.Equals(Unit.CELSIUS) && temp2.unit.Equals(Unit.FAHRENHEIT))
     {
         return(((temp1.value * 9 / 5) + 32).CompareTo(temp2.value) == 0);
     }
     return(false);
 }
        /// <summary>
        /// Override equals method
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            if (obj == this)
            {
                return(true);
            }
            QuantityMeasurement length = (QuantityMeasurement)obj;

            return(length.value == value && unit == length.unit);
        }
 /// <summary>
 /// To compare the values of the units
 /// </summary>
 /// <param name="unit1"></param>
 /// <param name="unit2"></param>
 /// <param name="baseUnit1"></param>
 /// <param name="baseUnit2"></param>
 /// <returns></returns>
 private bool CompareUnits(QuantityMeasurement unit1, QuantityMeasurement unit2, double baseUnit1, double baseUnit2)
 {
     return((unit1.value * baseUnit1).CompareTo(unit2.value * baseUnit2) == 0);
 }