public override bool Equals(System.Object otherStylist) { if (!(otherStylist is Stylist)) { return(false); } else { Stylist newStylist = (Stylist)otherStylist; bool areNamesEqual = (this.GetName() == newStylist.GetName()); bool areHireDateEqual = (this.GetHireDate() == newStylist.GetHireDate()); return(areNamesEqual && areHireDateEqual); } }
public override bool Equals(System.Object otherStylist) { if (!(otherStylist is Stylist)) { return(false); } else { Stylist newStylist = (Stylist)otherStylist; bool idEquality = this.GetId().Equals(newStylist.GetId()); bool nameEquality = this.GetName().Equals(newStylist.GetName()); bool hireDateEquality = this.GetHireDate().Equals(newStylist.GetHireDate()); return(idEquality && nameEquality && hireDateEquality); } }