public void Add(Food food, double weight) { var product = Foods.ContainsKey(food); if (product == false) { Foods.Add(food, weight); } else { Foods[food] += weight; } }