1
Thanks Manav for Diamond Problem Link
After Reading Diamond Problem now i have idea why c# not support multiple inheritance but there are Phrase like - ( "c# allow multiple-inheritance of interfaces. Interfaces are like abstract base classes that specify method signatures without implementing any behavior. Nevertheless, even when several interfaces declare the same method signature, as soon as that method is implemented (defined) anywhere in the inheritance chain, it overrides any implementation of that method in the chain above it. Hence, at any given level in the inheritance chain, there can be at most one implementation of any method. Thus, single-inheritance method implementation does not exhibit the Diamond Problem even with multiple-inheritance of interfaces." ). Can anyone help me to understand these in simple way(if possible then c# example).
1
my question is more related to why multiple inheritence not supported in c# . We do it by interface in c#
then Why we cannot extend multiple pure abstract class in c# ( as pure abstract class looks same as interface). Then one more question arises if pure abstract class is same as interface then in which condition interface is better option then pure abtract class
1
Hello
For Abstarct VS Interface :
https://www.codeproject.com/Articles/11155/Abstract-Class-versus-Interface
http://www.c-sharpcorner.com/uploadfile/prasoonk/abstract-class-vs-interface/
How to achieve Multiple Inheritance in C# :
https://www.codeproject.com/Articles/10072/Simulated-Multiple-Inheritance-Pattern-for-C
http://www.c-sharpcorner.com/blogs/multiple-inheritance-in-c-sharp-using-interfaces1
Thanks