public void AddNom(Nom nom, double grams) { foreach (NomsThisMeal test in _noms) { if (test.NomType.Id == nom.Id) { test.Grams += grams; return; } } NomsThisMeal newNom = new NomsThisMeal { MyMeal = this, NomType = nom, Grams = grams }; _noms.Add(newNom); }
public MealDisplayer(NomsThisMeal noms) { _nom = noms; }