Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
快速提问:在 C# 中,一个类可以实现一个基类和多个接口吗?
例如
public MyCar : CarBase, ICar, ISomething { ... }
谢谢
是的,这很好,只要类和/或基类实现所有接口声明的任何内容。
是的,你可以这样做。
这是一篇好文章:
http://msdn.microsoft.com/en-us/library/ms173149.aspx