Beispiel #1
0
        // Ex 5: Abstract class
        public void Ex5_Abstract()
        {
            //AbstractA a = new AbstractA(); // not allowed

            AbstractA b = new ConcreteB();

            b.Method01(); // polymorphic
            b.Method02();
        }
Beispiel #2
0
 // Ex 6: Constructor chaining
 public void Ex6_Chain()
 {
     AbstractA a = new ConcreteB();
 }