Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            BranchingLeaf <t1, t2, t3> tempLeaf = obj as BranchingLeaf <t1, t2, t3>;

            if (tempLeaf == null || !obj.GetType().Equals(this.GetType()))
            {
                return(false);
            }

            return(LHS.Equals(tempLeaf.LHS) && RHS.Equals(tempLeaf.RHS));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Override the != equality operator
        /// </summary>
        /// <param name="LHS">Course 1 to compare</param>
        /// <param name="RHS">Course 2 to compare</param>
        /// <returns>true if both instances of LHS and RHS are NOT equal to each other.</returns>
        public static bool operator !=(Course LHS, Course RHS)
        {
            if (((object)LHS) == null)
            {
                if (((object)RHS) == null)
                {
                    return(false);
                }
                else
                {
                    return(!RHS.Equals((object)LHS));
                }
            }

            return(!LHS.Equals((object)RHS));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Override the == equality operator
        /// </summary>
        /// <param name="LHS">Course 1 to compare</param>
        /// <param name="RHS">Course 2 to compare</param>
        /// <returns>true if both instances of LHS and RHS are equal to each other.</returns>
        public static bool operator ==(Course LHS, Course RHS)
        {
            if (((object)LHS) == null)
            {
                if (((object)RHS) == null)
                {
                    return(true);
                }
                else
                {
                    return(RHS.Equals((object)LHS));
                }
            }

            return(LHS.Equals((object)RHS));
        }