Beispiel #1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="BrandId1">A brand identification.</param>
        /// <param name="BrandId2">Another brand identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator > (Brand_Id BrandId1, Brand_Id BrandId2)
        {

            if ((Object) BrandId1 == null)
                throw new ArgumentNullException(nameof(BrandId1), "The given BrandId1 must not be null!");

            return BrandId1.CompareTo(BrandId2) > 0;

        }
Beispiel #2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="BrandId1">A brand identification.</param>
        /// <param name="BrandId2">Another brand identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator <(Brand_Id BrandId1, Brand_Id BrandId2)
        {
            if ((Object)BrandId1 == null)
            {
                throw new ArgumentNullException("The given brand identification must not be null!");
            }

            return(BrandId1.CompareTo(BrandId2) < 0);
        }
Beispiel #3
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="BrandId1">A brand identification.</param>
        /// <param name="BrandId2">Another brand identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator == (Brand_Id BrandId1, Brand_Id BrandId2)
        {

            // If both are null, or both are same instance, return true.
            if (Object.ReferenceEquals(BrandId1, BrandId2))
                return true;

            // If one is null, but not both, return false.
            if (((Object) BrandId1 == null) || ((Object) BrandId2 == null))
                return false;

            return BrandId1.Equals(BrandId2);

        }