Last modified on 3 June 2009, at 15:54

D Programming/Interfaces

There is an article in wikipedia describing the concept of interface in common.

The corresponding D specification is found on digitalmars.

An interface is something like a promise. A class implementing an interface promises to have at least all the listed methods. A class reference can be casted to the type of an implemented interface. This is useful, if another component is only interessted in a certain aspect of an object.

Interface DeclarationEdit

interface Identifier
{   //interface body begins here.
   
}   //interface body ends here.