Why multiple inheritance is not possible in c#
Rajesh Singh
Select an image from your device to upload
C# does not support multiple class inheritance. This is becaues of diamond problem which is associated with multiple class inheritance. For example I am having two classes namely class2 and class3 and these two classes are inherited from class1. Now we have another class namely class4 which is inherited from both class2 and class3. If the method in class4 calls a method in class1 and class 4 has not overridden the invoked method. Both class2 and clas3 has overriden the same methos differently. So there occurs the ambiguity problem wile invoking the methods. In order to solve this plobelm C# does not support multiple class inheritance.