Exemple #1
0
        static void Main(string[] args)
        {
            var car = new Automobile()
            {
                Make  = "Toyota",
                Model = "4Runer",
                Year  = 2010
            };

            //car.Display();
            Print(car);
            Console.ReadLine();

            var suv = new SUV()
            {
                Make           = "GMC",
                Model          = "Yukon",
                Year           = 2013,
                DriveMechanism = "4 wheel drive"
            };

            //suv.Display();
            Print(suv);
            Console.ReadLine();
        }
Exemple #2
0
 private static void Print(Automobile auto)
 {
     auto.Display();
 }