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