예제 #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);
     }
 }
예제 #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);
     }
 }