Ejemplo n.º 1
0
    public static void Main()
    {
        MainClass s;

        s = new ChildClassOne();
        s.NameFunct();
        s = new ChildClassTwo();
        s.NameFunct();
    }
Ejemplo n.º 2
0
    static void Main(string[] args)
    {
        Parent ObjParent        = new Parent();
        Parent ObjChildClassOne = new ChildClassOne();
        Parent ObjChildClassTwo = new ChildClassTwo();

        ObjParent.ParentFunct();
        ObjChildClassOne.ParentFunct();
        ObjChildClassTwo.ParentFunct();
    }