Click here to Skip to main content
16,022,752 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Quick question.

Going through inheritance articles

I understand that multiple inheritance is not supported in c#.net. But you can still achieve the functionality by implementing multiple interfaces. Now my question is Can a child class inherit from two or more classes as long as they are abstract? Is it possible ?

What coupling does inheritance support?
Posted
Updated 27-Dec-13 19:37pm
v2
Comments
Member 10491035 28-Dec-13 1:52am    
I think inheritance supports tight coupling. It is because the child classes are exposed to the majority of the parent class. Correct me if my understanding is wrong

1 solution

No.
A class can inherit from one and Oulu one base class, whether abstract or concrete. You can add as many Interfaces as you want, but one class is the absolute limit. C# does not support multiple inheritance in any form, outside the use of interfaces.
 
Share this answer
 
Comments
Member 10491035 28-Dec-13 2:18am    
Thank you for answering first question. How about coupling of classes in inheritance? Are they tightly coupled or loosely coupled?
OriginalGriff 28-Dec-13 2:40am    
Think about it: inheritance from a single base class had no alternative but to be tightly coupled! :laugh:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900