Пример #1
0
        public Pizza CreatePizza(string type)
        {
            Pizza p = null;

            if (type == "cheese")
            {
                p = new CheesePizza();
            }
            else if (type == "clam")
            {
                p = new ClamPizza();
            }

            return(p);
        }
Пример #2
0
        public Pizza CreatePizza(string type)
        {
            Pizza p = null;

            if (type == "cheese")
            {
                p = new CheesePizza();
            }
            else if (type == "clam")
            {
                p = new ClamPizza();
            }

            return p;
        }