Пример #1
0
        public Bouqet FindByColor(string color)
        {
            Bouqet b = new Bouqet();

            if (!_bouqet.Any())
            {
                throw new EmptyBouqetException("Букет пуст");
            }

            foreach (var flower in _bouqet)
            {
                if (flower.Color == color)
                {
                    b.Add(flower);
                }
            }
            return(b);
        }