Example #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);
        }
Example #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;
        }