Interfaces in C # are very similar to abstract classes, and they cannot instantiate their own objects, but they also have important differences. In interface and abstract class, classes cannot inherit multiple, but interfaces can inherit multiple.
This code indicates that the method of declaring the interface and the inherited interface are implemented without the defined method
In addition, a class can inherit multiple interfaces, so that all functions in the interface will be re-implemented once.
The interface can also be extended so that the previously defined interface can be reused. As follows:
This allows you to inherit from the class by isorableadd instead of using isorable.
Interface polymorphism (polymorphism with Interface).
Display the implementation of the interface:
This is the implementation of the display. The function to invoke the display implementation is to display the conversion. The implementation shown can prevent these functions from being exposed
Can only be obtained by conversion and cannot be instantiated.
C # 's interface interface