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