Home | » | C# | » | Interfaces |
---|
In object-oriented paradigm, multiple inheritance are most challening to implement. Interfaces allow multiple inheritances in C#.
An interface defines a contract. A class or struct that implements an interface must adhere to its contract. An interface may inherit from multiple base interfaces, and a class or struct may implement multiple interfaces.
Interface can contain methods, properties, events, and indexer. The interface itself does not provide implements for the members that it defines. The interface merely specifies the members that must be supplied by classes or struct that implement the interface.
Output