Given class sample is inherited by class sample 1. Which are the correct statements about construction of object of class sample?
A. While creating the object firstly the constructor of class sample will be called followed by constructor of class sample 1
B. The constructor of only sample class will be called
C. While creating the object firstly constructor of class sample 1 will be called followed by constructor of class sample
D. The order of calling constructors depend on whether constructors in class sample and sample 1 are private or public
Answer: Option C
Related Questions on Classes and Objects in C Sharp
A. A blueprint for creating objects
B. A method in C#
C. A variable in C#
D. A data type in C#
A. A method in C#
B. A variable in C#
C. An instance of a class
D. A data type in C#
A. public
B. private
C. protected
D. internal

Join The Discussion