Exemple #1
0
        public static void A_ChildClassGotMembersFromParent()
        {
            // ChangeColor method is introduced in the base class,
            // but each child can use it
            var car = new Car(200);

            car.ChangeColor("Green");

            var bicycle = new Bicycle(25);

            bicycle.ChangeColor("Red");
        }