public override bool Equals(System.Object otherSpecialty) { if (!(otherSpecialty is Specialty)) { return(false); } else { Specialty newSpecialty = (Specialty)otherSpecialty; bool specialtyEquality = (this.GetDescription() == newSpecialty.GetDescription() && this.GetID() == newSpecialty.GetID()); return(specialtyEquality); } }
public override bool Equals(System.Object otherSpecialty) { if (!(otherSpecialty is Specialty)) { return(false); } else { Specialty newSpecialty = (Specialty)otherSpecialty; bool idEquality = (this.GetId()) == newSpecialty.GetId(); bool descriptionEquality = (this.GetDescription()) == newSpecialty.GetDescription(); return(idEquality && descriptionEquality); } }
public override bool Equals(System.Object otherSpecialty) { if (!(otherSpecialty is Specialty)) { return(false); } else { Specialty newSpecialty = (Specialty)otherSpecialty; bool areIdsEqual = (this.GetId() == newSpecialty.GetId()); bool areNamesEqual = (this.GetDescription() == newSpecialty.GetDescription()); return(areIdsEqual && areNamesEqual); } }