Пример #1
0
 public override bool Equals(System.Object otherStylist)
 {
     if (!(otherStylist is Stylist))
     {
         return(false);
     }
     else
     {
         Stylist newStylist    = (Stylist)otherStylist;
         bool    areNamesEqual = this.GetStylistName().Equals(newStylist.GetStylistName());
         bool    areIdsEqual   = this.GetStylistId().Equals(newStylist.GetStylistId());
         bool    arePhoneEqual = this.GetStylistPhone().Equals(newStylist.GetStylistPhone());
         bool    areEmailEqual = this.GetStylistEmail().Equals(newStylist.GetStylistEmail());
         bool    areDateEqual  = this.GetStylistDate().Equals(newStylist.GetStylistDate());
         return(areNamesEqual && areIdsEqual &&
                arePhoneEqual && areEmailEqual && areDateEqual);
     }
 }