/// <summary> /// Overload operator - /// </summary> /// <param name="temp1">celsius grades</param> /// <param name="temp2">kelvin grades</param> /// <returns>Celsious with cantidadGrados= temp1 less temp2</returns> public static Celsius operator -(Celsius temp1, Kelvin temp2) { Celsius auxTemp = new Celsius(temp1.GetCantidadGrados() - ((Celsius)temp2).GetCantidadGrados()); return(auxTemp); }
/// <summary> /// Overload operator + /// </summary> /// <param name="temp1">celsius grades</param> /// <param name="temp2">fahranheit grades</param> /// <returns>Celsious with cantidadGrados= temp1 plus temp2</returns> public static Celsius operator +(Celsius temp1, Fahrenheit temp2) { Celsius auxTemp = new Celsius(temp1.GetCantidadGrados() + ((Celsius)temp2).GetCantidadGrados()); return(auxTemp); }