开发者

Why C# doen't support multiple inheritance [duplicate]

This question already has answers here: 开发者_Go百科 Closed 12 years ago.

Possible Duplicate:

Should C# include multiple inheritance?

One of my friend asked me the question i.e.Why C# doen't support multiple inheritance


Using interfaces is more flexible and eliminates the ambiguity of multiple inheritance.

Further details, HERE.


Multiple inheritance complicates the language and its implementation. I suspect the designers decided that the gains weren't worth the pains.


C#, like Java supports a way to deal with multiple inheritance by allowing a class to implement multiple Interfaces. Its not quite multiple inheritance but it can accomplish what you want to get done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜