Example #1
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="NetworkId1">A network identification.</param>
        /// <param name="NetworkId2">Another network identification.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(Network_Id NetworkId1, Network_Id NetworkId2)
        {
            if ((Object)NetworkId1 == null)
            {
                throw new ArgumentNullException(nameof(NetworkId1), "The given NetworkId1 must not be null!");
            }

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

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

            return(NetworkId1.Equals(NetworkId2));
        }