static void Main(string[] args) { IFruitGardener[] fruitGardeners = new IFruitGardener[3]; fruitGardeners[0] = new AppleGardener(); fruitGardeners[1] = new GrapeGardener(); fruitGardeners[2] = new StrawberryFruitGardener(); foreach (IFruitGardener fruitGardener in fruitGardeners) { IFruit fruit = fruitGardener.Factory(); Demo(fruit); } Console.ReadLine(); }