Exemplo n.º 1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="BookingId1">A booking identification.</param>
        /// <param name="BookingId2">Another booking identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(Booking_Id BookingId1, Booking_Id BookingId2)
        {
            if ((Object)BookingId1 == null)
            {
                throw new ArgumentNullException(nameof(BookingId1), "The given BookingId1 must not be null!");
            }

            return(BookingId1.CompareTo(BookingId2) > 0);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="BookingId1">A booking identification.</param>
        /// <param name="BookingId2">Another booking identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(Booking_Id BookingId1, Booking_Id BookingId2)
        {
            // If both are null, or both are same instance, return true.
            if (ReferenceEquals(BookingId1, BookingId2))
            {
                return(true);
            }

            // If one is null, but not both, return false.
            if (((Object)BookingId1 == null) || ((Object)BookingId2 == null))
            {
                return(false);
            }

            return(BookingId1.Equals(BookingId2));
        }