The CLR, the C# programming language, as well as other Common Language Infrastructure (CLI) languages support only single inheritance for classes. In other words, only a single base class can be used for any given class. When omitted, that base class is
System.Object. In the example shown in Figure 14.6, we try to declare a class
Tomato, which is both a
Fruit and a
Note: The Diamond Problem
One of the main reasons for not supporting multiple-class inheritance in the CLR comes from the well-known problems and complexities that arise from multiple inheritance, ...