C# Programming - Inheritance - Discussion
Discussion Forum : Inheritance - General Questions (Q.No. 13)
13.
Which of the following statements are correct about Inheritance in C#.NET?
- A derived class object contains all the base class data.
- Inheritance cannot suppress the base class functionality.
- A derived class may not be able to access all the base class data.
- Inheritance cannot extend the base class functionality.
- In inheritance chain construction of object happens from base towards derived.
Discussion:
5 comments Page 1 of 1.
Bhavin said:
1 decade ago
Seems something incomplete in option one. Derived class can not access private data of base class so it is wrong to say all data.
(1)
Shaila said:
1 decade ago
@Bhavin true it is right to say that 1 3 contradict each other.
Aditya said:
1 decade ago
A derived class object contains all the base class data. It just does not have access to private members.
Rakhi Kirti said:
1 decade ago
The above statement is trues as the derived class have access to all the data members except the private data members.
Olsen said:
10 years ago
1 and 3 do not contradict infact both are true along with 5 since a base class inherits all data members. But it can't have access to private fields.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers