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

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

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

            return(SensorId1.Equals(SensorId2));
        }