开发者

Why C# does not support multiple inheritance? [duplicate]

开发者 https://www.devze.com 2023-01-07 08:13 出处:网络
This question already has answers here: 开发者_StackOverflow社区 Closed 12 years ago. Possible Duplicates:
This question already has answers here: 开发者_StackOverflow社区 Closed 12 years ago.

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?


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.

0

精彩评论

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