Does c# really support multiple inheritance. People say it supports multiple inheritance in the form of interfaces ? But I dont think so
Does c# really support multiple inheritance. People say it supports multiple inheritance in the
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the literal sense, it does not support multiple inheritance. It can implement multiple interfaces, which offer polymorphic behaviour, so get you some benefits of multiple inheritance. However you get no base behaviour.
If you need the base behaviour a common tactic is for a base class to implement the interfaces and for derived classes to override this implementation where required.
I have yet to run into the need for multiple inheritance, I don’t think C# suffers for the lack of it.