Why C# does not support multiple inheritance? [dup

2020-07-27 03:58发布

Possible Duplicates:
Should C# include multiple inheritance?
Why C# doen’t support multiple inheritance

Why C# does not support multiple inheritance where as C++ supports it and we have to achieve the same using Interface?

标签: c#
1条回答
疯言疯语
2楼-- · 2020-07-27 05:03

We don't need to provide reasons for features to not be included. Rather, features must be justified on a cost-benefit basis. C# doesn't have multiple inheritance because the benefit of the feature does not justify the costs. Why should C# have multiple inheritance? It gets by without it perfectly well.

查看更多
登录 后发表回答