Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Plants flower1 = new Plants(0, "flower", "yellow");
            Plants flower2 = new Plants(0, "flower", "blue");
            Plants tree1   = new Plants(0, "tree", "orange");
            Plants tree2   = new Plants(0, "tree", "purple");

            List <Plants> plants = new List <Plants>()
            {
                flower1,
                flower2,
                tree1,
                tree2
            };

            watering(plants);
            Console.ReadLine();
        }
Exemplo n.º 2
0
 //igy adunk hozza uj egyedeket - A listát feltöltjük a plant objektum elemeivel - de lehet siman a program.cs-ben is x.FlowerTree.Add methoddal
 public void Planting(Plants plants)
 {
     FlowerTree.Add(plants);
 }
Exemplo n.º 3
0
 public void AddToMyGarden(Plants plant)
 {
     myGarden.Add(plant);
 }