Exemplo n.º 1
0
 public override bool Equals(System.Object otherSpeciality)
 {
     if (!(otherSpeciality is Speciality))
     {
         return(false);
     }
     else
     {
         Speciality newSpeciality = (Speciality)otherSpeciality;
         bool       areIdsEqual   = (this.GetId() == newSpeciality.GetId());
         bool       areNamesEqual = (this.GetDescription() == newSpeciality.GetDescription());
         return(areIdsEqual && areNamesEqual);
     }
 }
Exemplo n.º 2
0
 public override bool Equals(System.Object otherSpeciality)
 {
     if (!(otherSpeciality is Speciality))
     {
         return(false);
     }
     else
     {
         Speciality newSpeciality       = (Speciality)otherSpeciality;
         bool       idEquality          = this.GetId() == newSpeciality.GetId();
         bool       descriptionEquality = this.GetDescription() == newSpeciality.GetDescription();
         return(idEquality && descriptionEquality);
     }
 }