Does C# support multiple inheritances
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
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
Suryansh ShuklaRank #1,605 · 978 reputationPosted Jul 12, 2025, 2:53 PM EDT
No — C# does not support multiple inheritance of classes.
In C#, a class cannot inherit from more than one base class. This is by design, to avoid the complexity and ambiguity problems that can arise with multiple inheritance (like the diamond problem).
However, C# does support multiple inheritance of interfaces.
Jignesh KumarRank #91 · 22.9K reputationPosted Jul 13, 2025, 10:05 PM EDT
C# does not support multiple inheritance of classes, but it does support multiple inheritance of interfaces.
Real-time example of multiple inheritance in C# using Interface
public interface IPrinter { void Print(string content); } public interface IScanner { void Scan(); } public class Printer : IPrinter { public void Print(string content) { Console.WriteLine($"Printing: {content}"); } } public class Scanner : IScanner { public void Scan() { Console.WriteLine("Scanning document..."); } } public class PrinterScanner : IPrinter, IScanner { private readonly Printer _printer = new Printer(); private readonly Scanner _scanner = new Scanner(); public void Print(string content) { _printer.Print(content); } public void Scan() { _scanner.Scan(); } }