Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rijwan AnsariRank #82 · 24.2K reputationPosted Sep 17, 2022, 1:30 AM EDT
It is not supported, and actually you don't need it. You can fix it with Interfaces easily.
Uday DodiyaRank #239 · 10.3K reputationPosted Sep 15, 2022, 12:36 AM EDT
Multiple Inheritance isn’t supported in C#. To implement multiple inheritances, use Interfaces.
Refer Following For More
https://www.geeksforgeeks.org/c-sharp-multiple-inheritance-using-interfaces/
Jignesh KumarRank #91 · 22.9K reputationPosted Sep 15, 2022, 12:52 AM EDT
Hi,
By Default C# doesn't support multiple inheritance but we can achieve vai Interface, You can refer this article which will help you to understand step by step,
https://www.c-sharpcorner.com/UploadFile/0c1bb2/types-of-inheritance-in-C-Sharp/
Amit MohantyRank #112 · 20K reputationPosted Sep 15, 2022, 1:05 AM EDT
C# does not support multiple inheritance. In C#, the classes are only allowed to inherit from a single parent class, which is called single inheritance. But multiple Inheritance can be achieved in C# using Interfaces.
For more details check links
https://www.c-sharpcorner.com/blogs/multiple-inheritance-in-c-sharp-using-interfaces1
https://dotnettutorials.net/lesson/multiple-inheritance-csharp/
Vishal YelveRank #178 · 13.6K reputationPosted Sep 15, 2022, 1:25 AM EDT
Hi Dpk,
Multiple Inheritance isn’t supported in C#. To implement multiple inheritances, use Interfaces.
The reason behind this is:
calculate()in two base classes and both are doing different calculations. What happened if the user callscalculate()in the child class? Which method will work?InheritancewithInterfaceprovides the same job of multiple inheritances.Also, Please refer to below links
https://www.c-sharpcorner.com/blogs/multiple-inheritance-in-c-sharp-using-interfaces1
https://www.dotnetforall.com/why-c-sharp-doesnt-support-multiple-inheritance/
sudeep H15 reputationPosted Sep 15, 2022, 8:05 AM EDT
Multiple Inheritance isn’t supported in C#. To implement multiple inheritances, use Interfaces.
Satya KarkiRank #78 · 24.6K reputationPosted Sep 17, 2022, 1:56 AM EDT
Hi,
check below article for more clarification.
http://net-informations.com/faq/general/inheritance.htm
But C# does not support multiple class inheritance. To overcome this problem, we use interfaces to achieve multiple class inheritance.
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Sep 17, 2022, 6:57 AM EDT
C# does not support mutliple inheritance, Using interface we can achieve it.
Brahma Prakash ShuklaRank #633 · 3.8K reputationPosted Oct 19, 2022, 4:40 AM EDT
C# does not support multiple class inheritance. To overcome this problem we use interfaces to achieve multiple class inheritance.
Rajeev KumarRank #1,334 · 1.3K reputationPosted Mar 14, 2023, 5:54 AM EDT
C# does not support multiple inheritance. In C#, the classes are only allowed to inherit from a single parent class, which is called single inheritance. But in C# we can achieve it by Interface.