Ejemplo n.º 1
0
 public override bool Equals(System.Object otherSpecies)
 {
     if (!(otherSpecies is Species))
     {
         return(false);
     }
     else
     {
         Species newSpecies   = (Species)otherSpecies;
         bool    idEquality   = (this.GetId() == newSpecies.GetId());
         bool    nameEquality = (this.GetName() == newSpecies.GetName());
         return(idEquality && nameEquality);
     }
 }