Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

D Programming/Interfaces

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

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 interested in a certain aspect of an object. Interface Declaration interface Identifier { //interface body begins here. } //interface body ends here.