Example #1
0
 public override bool Equals(System.Object otherRecipe)
 {
     if (!(otherRecipe is Recipe))
     {
         return(false);
     }
     else
     {
         Recipe newRecipe           = (Recipe)otherRecipe;
         bool   idEquality          = (this.GetId() == newRecipe.GetId());
         bool   nameEquality        = (this.GetName() == newRecipe.GetName());
         bool   ingredientEquality  = (this.GetIngredient() == newRecipe.GetIngredient());
         bool   instructionEquality = (this.GetInstruction() == newRecipe.GetInstruction());
         bool   ratingEquality      = (this.GetRating() == newRecipe.GetRating());
         return(idEquality && nameEquality && ingredientEquality && instructionEquality && ratingEquality);
     }
 }