Partager via


Interfaces in the Common Type System 

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 cannot define 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

Concepts

Type Members
Security Permissions

Other Resources

Common Type System