D Documentation  
Delegates
Delegates can be seen as "method pointers". They contain a reference to the object and a pointer to the method, therefore it can not point to functions or static methods.

Example:
int delegate(int) foobar;   // foobar is a delegate which takes an int and returns an int

class Foo {
  int mymethod(int x) {
    return x;
  }
}

Foo foo = new Foo();
foobar = &foo.mymethod;
writefln(foobar(128));      // call mymethod(128)
Created using PHP docwiki written by Markus Dangl. Best viewed with Mozilla Firefox.