Beispiel #1
0
        //</Snippet4>

        //<Snippet5>
        public static void TestCars1()
        {
            Car car1 = new Car();

            car1.DescribeCar();
            System.Console.WriteLine("----------");

            ConvertibleCar car2 = new ConvertibleCar();

            car2.DescribeCar();
            System.Console.WriteLine("----------");

            Minivan car3 = new Minivan();

            car3.DescribeCar();
            System.Console.WriteLine("----------");
        }
Beispiel #2
0
        static void testoverride_new()
        {
            Car car1 = new Car();

            car1.DescribeCar();
            System.Console.WriteLine("----------");


            Car car2 = new ConvertibleCar();

            car2.DescribeCar();
            System.Console.WriteLine("----------");


            Car car3 = new Minivan();

            car3.DescribeCar();
            System.Console.WriteLine("----------");
            System.Console.ReadKey();
        }