コード例 #1
0
ファイル: EVSP_Id.cs プロジェクト: rewatt/WWCP_Core
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="EVSPId1">A EVSPId.</param>
        /// <param name="EVSPId2">Another EVSPId.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(EVSP_Id EVSPId1, EVSP_Id EVSPId2)
        {
            if ((Object)EVSPId1 == null)
            {
                throw new ArgumentNullException("The given EVSPId1 must not be null!");
            }

            return(EVSPId1.CompareTo(EVSPId2) > 0);
        }
コード例 #2
0
ファイル: EVSP_Id.cs プロジェクト: rewatt/WWCP_Core
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="EVSPId1">A EVSPId.</param>
        /// <param name="EVSPId2">Another EVSPId.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(EVSP_Id EVSPId1, EVSP_Id EVSPId2)
        {
            // If both are null, or both are same instance, return true.
            if (Object.ReferenceEquals(EVSPId1, EVSPId2))
            {
                return(true);
            }

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

            return(EVSPId1.Equals(EVSPId2));
        }