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()); return(idEquality && nameEquality); } }
public override bool Equals(System.Object otherStylist) { if (!(otherStylist is Stylist)) { return(false); } else { Stylist newStylist = (Stylist)otherStylist; bool idEqual = (this.GetId() == newStylist.GetId()); bool nameEqual = (this.GetName() == newStylist.GetName()); bool detailEqual = (this.GetDetail() == newStylist.GetDetail()); return(idEqual && nameEqual && detailEqual); } }
public override bool Equals(System.Object secondStylist) { if (!(secondStylist is Stylist)) { return(false); } else { Stylist firstStylist = (Stylist)secondStylist; bool idEquality = (this.GetId() == firstStylist.GetId()); bool nameEquality = (this.GetName() == firstStylist.GetName()); bool informationEquality = (this.GetInformation() == firstStylist.GetInformation()); return(idEquality && nameEquality && informationEquality); } }
public override bool Equals(System.Object otherStylist) { if (!(otherStylist is Stylist)) { return(false); } else { Stylist newStylist = (Stylist)otherStylist; bool idEquality = (this.GetId() == newStylist.GetId()); bool nameEquality = (this.GetName() == newStylist.GetName()); bool hireDateEquality = (this.GetHireDate() == newStylist.GetHireDate()); bool phoneEquality = (this.GetPhone() == newStylist.GetPhone()); return(idEquality && nameEquality && hireDateEquality && phoneEquality); } }
public override bool Equals(System.Object otherStylist) { if (!(otherStylist is Stylist)) { return(false); } else { Stylist newStylist = (Stylist)otherStylist; bool nameEquality = this.GetName().Equals(newStylist.GetName()); bool idEquality = this.GetId().Equals(newStylist.GetId()); bool descriptionEquality = this.GetDescription().Equals(newStylist.GetDescription()); bool timestampEquality = this.GetTimestamp().Equals(newStylist.GetTimestamp()); if (nameEquality == true && idEquality == true && descriptionEquality == true) { return(true); } return(false); } }
public override bool Equals(System.Object otherStylist) { if (!(otherStylist is Stylist)) { return(false); } else { Stylist newStylist = (Stylist)otherStylist; return(this.GetId().Equals(newStylist.GetId()) && this.GetName().Equals(newStylist.GetName())); } } //for future test to compare two instance