public static IProduct CreateProduct(string productName) { IProduct product = null; switch (productName) { case "ConcreateAProudct": product = new ConcreteAProduct(); break; default: product = new ConcreteProduct(); break; } return product; }
public static IProduct CreateProduct(string productName) { IProduct product = null; switch (productName) { case "ConcreateAProudct": product = new ConcreteAProduct(); break; default: product = new ConcreteProduct(); break; } return(product); }