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