akrao koti
Which constructor call first
By akrao koti in C# on Jun 06 2013
  • Devesh Omar
    Jan, 2014 9

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

    • 0
  • akrao koti
    Jun, 2013 6

    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?


    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS