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