Home / C# Programming / Inheritance :: Discussion

Discussion :: Inheritance

  1. Assume class B is inherited from class A. Which of the following statements is correct about construction of an object of class B?

  2. A.
    While creating the object firstly the constructor of class B will be called followed by constructor of class A.
    B.
    While creating the object firstly the constructor of class A will be called followed by constructor of class B.
    C.
    The constructor of only class B will be called.
    D.
    The constructor of only class A will be called.
    E.
    The order of calling constructors depends upon whether constructors in class A and class B are private or public.

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No answer description available for this question.


Be The First To Comment