Exemplo n.º 1
0
 private bool existeIngrediente(Ingrediente i)
 {
     foreach (Ingrediente ingrediente in this.ingredientes)
     {
         if (ingrediente.Equals(i))
         {
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 2
0
 public void add(Ingrediente ingrediente)
 {
     //if (!existeIngrediente(ingrediente)) {
     this.ingredientes.Add(ingrediente);
     //}
 }