/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="ChargingTariff1">A charging tariff.</param> /// <param name="ChargingTariff2">Another charging tariff.</param> /// <returns>true|false</returns> public static Boolean operator >(ChargingTariff ChargingTariff1, ChargingTariff ChargingTariff2) { if ((Object)ChargingTariff1 == null) { throw new ArgumentNullException(nameof(ChargingTariff1), "The given ChargingTariff1 must not be null!"); } return(ChargingTariff1.CompareTo(ChargingTariff2) > 0); }
/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="ChargingTariff1">A charging tariff.</param> /// <param name="ChargingTariff2">Another charging tariff.</param> /// <returns>true|false</returns> public static Boolean operator ==(ChargingTariff ChargingTariff1, ChargingTariff ChargingTariff2) { // If both are null, or both are same instance, return true. if (Object.ReferenceEquals(ChargingTariff1, ChargingTariff2)) { return(true); } // If one is null, but not both, return false. if (((Object)ChargingTariff1 == null) || ((Object)ChargingTariff2 == null)) { return(false); } return(ChargingTariff1.Equals(ChargingTariff2)); }