コード例 #1
0
 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);
     }
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
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.GetDescription() == newSpecialty.GetDescription());
         return(areIdsEqual && areNamesEqual);
     }
 }