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