Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| Term
| Interface
|
| Definition
| Reference type containing only abstract members—delegates, events, indexers, public methods, properties. The interface contains only member declarations. A class implementing an interface must provide the implementation of the interface members. An interface cannot contain constants, constructors, data fields, destructors, or static members. Interface member declarations are implicitly public. Classes or structs may inherit any number of interfaces.
A C# interface is declared with the interface keyword.
|
| See also
| Abstract class, Class, Inheritance, Interface contract, Should I use an abstract class or an interface?
|
| You may edit this definition to improve or extend it.
|