public override bool Equals(System.Object otherSpecialty)
        {
            if (!(otherSpecialty is Specialty))
            {
                return(false);
            }
            Specialty newSpecialty = (Specialty)otherSpecialty;
            bool      idEquality   = (this.GetId() == newSpecialty.GetId());
            bool      nameEquality = (this.GetName() == newSpecialty.GetName());

            return(idEquality && nameEquality);
        }
Ejemplo n.º 2
0
 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.GetName() == newSpecialty.GetName());
         return(areIdsEqual && areNamesEqual);
     }
 }
Ejemplo n.º 3
0
 public override bool Equals(System.Object otherspecialty
                             )
 {
     if (!(otherspecialty is Specialty))
     {
         return(false);
     }
     else
     {
         Specialty newSpecialty = (Specialty)otherspecialty;
         bool      nameEquality = this.GetName() == newSpecialty.GetName();
         return(nameEquality);
     }
 }