示例#1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="HourMin1">A HourMin.</param>
        /// <param name="HourMin2">Another HourMin.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(HourMin HourMin1, HourMin HourMin2)
        {
            if ((Object)HourMin1 == null)
            {
                throw new ArgumentNullException("The given HourMin1 must not be null!");
            }

            return(HourMin1.CompareTo(HourMin2) > 0);
        }
示例#2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="HourMin1">A HourMin.</param>
        /// <param name="HourMin2">Another HourMin.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(HourMin HourMin1, HourMin HourMin2)
        {
            // If both are null, or both are same instance, return true.
            if (Object.ReferenceEquals(HourMin1, HourMin2))
            {
                return(true);
            }

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

            return(HourMin1.Equals(HourMin2));
        }
示例#3
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="HourMin1">A HourMin.</param>
        /// <param name="HourMin2">Another HourMin.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(HourMin HourMin1,
                                         HourMin HourMin2)

        => HourMin1.CompareTo(HourMin2) > 0;
示例#4
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="HourMin1">A HourMin.</param>
        /// <param name="HourMin2">Another HourMin.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(HourMin HourMin1,
                                          HourMin HourMin2)

        => HourMin1.Equals(HourMin2);