This article refers to section 13.11 of the CLR via C #.
Whether the base class or interface should be designed, this problem cannot be generalize, and some guiding principles are provided below:
1. Is_a relationship (meaning belonging to, for example, cars belonging to vehicles) vs can_do relationships (meaning that a type can convert its own instance to another type) can inherit only one implementation. If a derived type does not have a is_a relationship to the base class, the base class should not be used and the interface should be used. An interface implies a CAN_DO relationship. If more than one object type has CAN_DO functionality, the interface is used. For example, a type can convert its own instance to another type, a type can serialize its own instance, and so on. Note that value types must derive from System.ValueType, all of which they cannot derive from any base class. In this case, you must use a CAN_DO relationship and define an interface;
2. Easy to use for developers, defining a new type derived from a base class is often much easier than implementing all the methods of an interface. A base type can provide a number of features, and all derived types may only need to be slightly altered for their behavior. If an interface is provided, the new type must implement all members;
3. Consistency implementation no matter how good the contract document of an interface is, there is no guarantee that anyone can achieve it correctly. In fact, COM is quite vulnerable to this problem, which causes some COM objects to be used only correctly in Microsoft Office Word. If you provide a good default implementation for a base type, then you start with a type that works and is well tested, and you only need to modify it to suit your needs;
4. Version control adds a method to the base class, and the derived class inherits the new method. The first thing to use is a working type, and the user's source code doesn't even need to be recompiled. Adding a new member to an interface forces the successor of the interface to change its source code and recompile.
The interface can also be provided, and the base class of the interface is implemented.
Base class vs Interface