DEV Community


Discussion on: C# Interview Questions for Experienced

jayjeckel profile image
Jay Jeckel

Q1: The correct answer is that if both V and W are classes, then class X can't inherit from both, so there is no "diamond problem" in C#.

Also, interfaces don't "allows multiple class inheritance", they don't allow inheritance at all, because you don't inherit an interface, you implement an interface. In C# a class can inherit one other class and it can implement any number of interfaces.