Пример #1
0
        /// <summary>Compares a SpindaSpots to a C# object.</summary>
        /// <param name="rhs">Object with which to compare self</param>
        /// <returns>Whether or not SpindaSpots and Object are equal</returns>
        public override bool Equals(System.Object rhs)
        {
            if (rhs == null)
            {
                return(false);
            }

            SpindaSpots rhsSpindaSpots = rhs as SpindaSpots;

            if (rhsSpindaSpots == null)
            {
                return(false);
            }
            else
            {
                return(this.Equals(rhsSpindaSpots));
            }
        }
Пример #2
0
 /// <summary>Compares two SpindaSpots instances to determine value equality.</summary>
 /// <remarks>
 /// Two instances are determined to be equal if their each corresponding spot is equal.
 /// </remarks>
 /// <param name="rhs">SpindaSpots with which to compare self</param>
 /// <returns>Whether or not SpindaSpots instances are equal</returns>
 public bool Equals(SpindaSpots rhs)
 {
     if (rhs == null)
     {
         return(false);
     }
     else if (this == rhs)
     {
         return(true);
     }
     else
     {
         return(this.LeftEar.Equals(rhs.LeftEar) &&
                this.RightEar.Equals(rhs.RightEar) &&
                this.LeftFace.Equals(rhs.LeftFace) &&
                this.RightFace.Equals(rhs.RightFace));
     }
 }