Exemplo n.º 1
0
 public override bool Equals(System.Object otherRestaurant)
 {
     if (!(otherRestaurant is Restaurant))
     {
         return(false);
     }
     else
     {
         Restaurant newRestaurant      = (Restaurant)otherRestaurant;
         bool       idEquality         = (this.GetId() == newRestaurant.GetId());
         bool       nameEquality       = (this.GetName() == newRestaurant.GetName());
         bool       styleEquality      = (this.GetStyle() == newRestaurant.GetStyle());
         bool       cuisine_idEquality = (this.GetCuisineId() == newRestaurant.GetCuisineId());
         return(idEquality && nameEquality && styleEquality && cuisine_idEquality);
     }
 }