Multiple Inheritance in C#: Interfaces, the Diamond Problem and Composition (.NET 10)
Most people’s first try at multiple inheritance in C# looks like class Thermostat : Device, WifiModule. It won’t compile. The .NET 10 compiler stops with CS1721, because a C# class can have only one base class. Quick answer: keep one base class and implement as many interfaces as you need: class Thermostat : Device, INetworked, … Read more >>