Share via


Interfaces

Interfaces can have static members, nested types, and abstract, virtual members, properties, and events. Any class implementing an interface must supply definitions for the abstract members declared in the interface. An interface can require that any implementing class must also implement one or more other interfaces.

The following restrictions apply to interfaces:

  • An interface can be declared with any accessibility, but interface members must all have public accessibility.
  • No security permissions can be attached to members or to the interface itself.
  • Interfaces can define class constructors, but not instance constructors.

Each language must provide rules for mapping an implementation to the interface that requires the member, as more than one interface can declare a member with the same signature and these members can have separate implementations.

See Also

Common Type System | Type Members | Security Permissions