This inheritance is not supported by . NET Languages like C#, F# etc. In the given example, class D inherits the properties and behavior of class C and class B as well as Class A. ... So it's making it Multipath inheritance.
Syntax:
//Base Class
class A
{ public void fooA()
{
//TO DO:
}
}
//Derived Class
class B : A { public void fooB() { //TO DO: } }
//Derived Class
class C : A { public void fooC() { //TO DO: } }
//Derived Class
class D : B, A, C { public void fooD() { //TO DO: } }
looks like you are learning c# and good to see that you are trying to help others but check your solution before pasting it. c# does not support multiple inheritence as you mentioned but does not refecled into your solutiuon. " i may be wrong to understand.
Class class D : B, A, C { public void fooD() { //TO DO: } }"
you can achive this by interfaces in c#. you can inherit multiple interfaces.
Dipa MehtaPosted Dec 5, 2019, 12:24 PM
Dipa MehtaPosted Dec 6, 2019, 1:21 AM
Ashutosh GuptaPosted Dec 6, 2019, 12:00 AM