D Documentation  
Classes
A class foo is described with the class statement:

class foo
{
  /* your code here */
}

A class can contain variables and zero or more constructors , which are called when an object of this class is generated:
class foo
{
  int a = 0;
  this()
  {
    a++;
  }
  this(int b)
  {
    a = b;
  }
}

foo myFoo  = new foo();  // myFoo.a  is 1
foo myFoo2 = new foo(5); // myFoo2.a is 5

Every class can have none ore one SuperClass, from which it is inherited from. It's constructor ("this()") can use super to call the SuperClasses constructor:

class bar:foo {
  bool isnumber;
  this() {
    isnumber = false;
    super(-1);
  }
  this(int b) {
    super(b+1);
    isnumber = true;
  }
}

bar myBar  = new bar();  // myBar.a  is -1 , myBar.isnumber == false
bar myBar2 = new bar(8); // myBar2.a is  9 , myBar.isnumber == true

In this case, SuperClass is foo, the class name is bar and the constructor of foo is called with -1 or with b+1.
Created using PHP docwiki written by Markus Dangl. Best viewed with Mozilla Firefox.