Multiple inheritance

  • Thread starter Thread starter majid
  • Start date Start date
Hi,
How can i write classes with multiple inheritance

Simple answer: You can't.

Less simple answer: You can't unless you use interfaces.

There's lots of info on the web. Try google.

-- Pete
 
Hi,

Changing to C++ :)

C# ( as well as java ) has single inheritance. why? It's simpler to
implement the compiler and a lot of people thinks that multime inheritance
is not needed. if you look into google you will find the arguments both
tendences give.

In C# you can have a class implementing multiples interfaces, this give you
some of the features expected from multiple inheritance. you can also use
one or more design patterns ( facade, adapter, etc ) to help you .


Hope this help,
 
Back
Top