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

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

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

            return(Identification1.Equals(Identification2));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="Identification1">An identification.</param>
        /// <param name="Identification2">Another identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator !=(Identification Identification1,
                                          Identification Identification2)

        => !(Identification1.Equals(Identification2));