Something like: class Foo { int a; this() { a = 0; } void delegate(int) sum(int n) { a += n; return cast(void delegate(int)) &this.sum; } }