2
Reply

Which constructor call first

akrao koti

akrao koti

11y
1k
0
Reply

    Constructor calling follow top to down approach. So constructor of Parent calls first and then child.

    I Have two classes 

    calss Parent
    {
     public Parent()
    console.wl("parent cons");
    }
    }

    Class Child : Parent
    {
            public Child ()
    console.wl("Parent cons");
    }

    Static Void Main()
    {
                    child obj=new  child();
                    console.readline();
    }
    }

    Which constructor calls first? and Why?