public static void Main()
    {
        Console.WriteLine("Creating a DerivedClass object");
        DerivedClass myDerivedClass = new DerivedClass("Toyota", "MR2");

        Console.WriteLine("Calling myDerivedClass.Accelerate()");
        myDerivedClass.Accelerate();
    }
Ejemplo n.º 2
0
    public static void Main()
    {
        DerivedClass myDerivedClass = new DerivedClass("A", "M");

        Console.WriteLine("Calling myDerivedClass.Accelerate()");
        myDerivedClass.Accelerate();


        MyClass myclass = new MyClass("A", "M");

        myclass.Accelerate();
    }