Class.addProperty

void addProperty(alias Getter, alias Setter = readOnlyProperty)(string name) if ((isCallable!Getter && !is(ReturnType!Getter == void) && Parameters!Getter.length == 0) && (__traits(isSame, Setter, readOnlyProperty) || (isCallable!Setter && is(ReturnType!Setter == void) && Parameters!Setter.length == 1))) nothrow

Add a property to a Class.

Parameters

GetterThe getter method
SetterThe setter method (optional)
nameThe property name