Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            //create tyre
            Tyres tyres = new Tyres { Name = "Nokia ", Model = "Hakkapeliitat ", Size = "jsjwsefesof" };

            //create car

            Vehichle car = new Vehichle { Name = "Opel", Type = "Vectra " };
            car.AddTyre(tyres); //7 car contains
            car.AddTyre(tyres); //7 car contains
            car.AddTyre(tyres); //7 car contains
            car.AddTyre(tyres); //7 car contains

            Console.WriteLine(car.ToString());

            Console.WriteLine();
            Console.ReadLine();



        }
Ejemplo n.º 2
0
 public void AddTyre(Tyres tyres)
 {
     Tyre.Add(tyres);
 }