DEV Community

Discussion on: Interfaces explained

Collapse
 
lukaszreszke profile image
Łukasz Reszke

Thanks for the comment, Sebastian 🙏

Another important thing to mention regarding C# specifically: C# doesn't support multiple inheritance, so implementing multiple interfaces is one way out of this dilemma.

Thanks for adding that. It's an important aspect of C#.

Regarding your examples, I believe two
different, entirely unrelated classes implementing the same interface would have been a good way to illustrate the "implementation vs. interface" dichotomy. INotifyPropertyChanged or IDisposable are good candidates.

Great example.