public IDairyProducts ProvideDairyProduct(string type) { IDairyProducts product; switch (type) { case "1": product = new Cheeze(); break; case "2": product = new Paneer(); break; case "3": product = new Curd(); break; default: product = new Cheeze(); break; } return product; }
public IDairyProducts ProvideDairyProduct(string type) { IDairyProducts product; switch (type) { case "1": product = new Cheeze(); break; case "2": product = new Paneer(); break; case "3": product = new Curd(); break; default: product = new Cheeze(); break; } return(product); }