extends and implements

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Nov 7 10:36:52 PST 2011


If you need some kind of textual information on whether its a class or
an interface, you can name your interfaces with an "I".

interface IShape
{
}

abstract class Drawable
{
}

class Rectangle : IShape, Drawable {}

It's pretty common in other languages, I've seen it used in D as well.


More information about the Digitalmars-d-learn mailing list