Click here to Skip to main content
15,898,538 members
Home / Discussions / C#
   

C#

 
GeneralRe: Whatever Happened to Multiple Inheritance? Pin
Roger Alsing10-Jun-08 1:13
Roger Alsing10-Jun-08 1:13 
GeneralRe: Whatever Happened to Multiple Inheritance? Pin
Vikram A Punathambekar10-Jun-08 4:46
Vikram A Punathambekar10-Jun-08 4:46 
GeneralRe: Whatever Happened to Multiple Inheritance? Pin
Roger Wright10-Jun-08 8:08
professionalRoger Wright10-Jun-08 8:08 
AnswerRe: Whatever Happened to Multiple Inheritance? Pin
Colin Angus Mackay9-Jun-08 22:22
Colin Angus Mackay9-Jun-08 22:22 
GeneralRe: Whatever Happened to Multiple Inheritance? Pin
Roger Wright10-Jun-08 8:07
professionalRoger Wright10-Jun-08 8:07 
AnswerRe: Whatever Happened to Multiple Inheritance? Pin
#realJSOP10-Jun-08 0:22
professional#realJSOP10-Jun-08 0:22 
GeneralRe: Whatever Happened to Multiple Inheritance? Pin
Roger Wright10-Jun-08 8:09
professionalRoger Wright10-Jun-08 8:09 
AnswerRe: Whatever Happened to Multiple Inheritance? Pin
Mike Dimmick10-Jun-08 2:45
Mike Dimmick10-Jun-08 2:45 
Multiple-inheritance is a problem in C++ when more than one base class share a common base class. For example, your class E derives from B1 and B2, and B1 and B2 both derive from A. Should your class E have one or two copies of A? The C++ answer is two, unless B1 and B2 declared A as a virtual base class, in which case they share a common set of A's members. My recollection is that this causes some other problems, though I can't recall what they are now. Something to do with construction, perhaps?

For more on this and how some other languages solve the problem, see Diamond problem[^] on Wikipedia.

Anyway, due to C++'s problems in this area, the designers of Java and then C# decided to explicitly separate out interface inheritance from base class inheritance, and only allow a single base class. C# allows explicit interface implementation in case of method name conflicts.


DoEvents: Generating unexpected recursion since 1991

GeneralRe: Whatever Happened to Multiple Inheritance? Pin
Roger Wright10-Jun-08 8:11
professionalRoger Wright10-Jun-08 8:11 
QuestionHow to execute some batch file that my FTP server contain ? Pin
Yanshof9-Jun-08 18:46
Yanshof9-Jun-08 18:46 
Questionhow to use the control of DevComponents.DotNetBar.SideBarPanelItem Pin
cqdong809-Jun-08 17:51
cqdong809-Jun-08 17:51 
QuestionDateTime.Now Pin
George_George9-Jun-08 17:32
George_George9-Jun-08 17:32 
AnswerRe: DateTime.Now Pin
Christian Graus9-Jun-08 17:47
protectorChristian Graus9-Jun-08 17:47 
GeneralRe: DateTime.Now Pin
George_George9-Jun-08 18:48
George_George9-Jun-08 18:48 
GeneralRe: DateTime.Now Pin
Christian Graus9-Jun-08 18:57
protectorChristian Graus9-Jun-08 18:57 
GeneralRe: DateTime.Now Pin
George_George9-Jun-08 19:03
George_George9-Jun-08 19:03 
GeneralRe: DateTime.Now Pin
Christian Graus9-Jun-08 19:11
protectorChristian Graus9-Jun-08 19:11 
GeneralRe: DateTime.Now Pin
George_George9-Jun-08 19:49
George_George9-Jun-08 19:49 
GeneralRe: DateTime.Now Pin
Ashfield9-Jun-08 21:29
Ashfield9-Jun-08 21:29 
GeneralRe: DateTime.Now Pin
George_George9-Jun-08 22:22
George_George9-Jun-08 22:22 
GeneralRe: DateTime.Now Pin
#realJSOP10-Jun-08 2:56
professional#realJSOP10-Jun-08 2:56 
GeneralRe: DateTime.Now Pin
George_George10-Jun-08 3:00
George_George10-Jun-08 3:00 
AnswerRe: DateTime.Now Pin
PIEBALDconsult9-Jun-08 17:48
mvePIEBALDconsult9-Jun-08 17:48 
GeneralRe: DateTime.Now Pin
George_George9-Jun-08 18:47
George_George9-Jun-08 18:47 
GeneralRe: DateTime.Now Pin
PIEBALDconsult9-Jun-08 19:19
mvePIEBALDconsult9-Jun-08 19:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.