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

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

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

            return(TagId1.Equals(TagId2));
        }