- class DerivedClass : BaseClass
- class DerivedClass : BaseClass, IExampleInterface
- class DerivedClass : BaseClass, IExampleInterface, IAnotherInterface
Classes can inherit directly from only one class, but (instead or at the same time) can implement one or more interfaces.
Structs can implement interfaces but cannot explicitly inherit from any type. They implicitly inherit from
System.ValueType, which in turn inherits directly from
Static classes cannot implement interfaces.
Base class with recursive type specification
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0