コード例 #1
0
 static void Main(string[] args)
 {
     //get a new garden
     myGarden = new FruitGarden();
     Console.WriteLine(myGarden.PlantFruit("banana"));    //returns "You grew one banana!"
     Console.WriteLine(myGarden.PlantFruit("apple"));     //returns "You grew one apple!"
     Console.WriteLine(myGarden.PlantFruit("orange"));    //returns "You can't grow that type of fruit!"
     EatFruits();
 }
コード例 #2
0
    static void Main(string[] args)
    {
        FruitGarden fruitGarden = new FruitGarden();

        fruitGarden.EatFruits();
    }
コード例 #3
0
 static void Main(string[] args)
 {
     FruitGarden fruitGarden = new FruitGarden();
     // Use fruitGarden
 }