Can I do something like this, or should I use the static constructor for this? If so, how should I set the first parameter:size ? Fruits fruit[]; class Fruit { this( parameters ) { fruit[].length=fruit[].length+1; fruit[$-1]=this; } .. void stuff() { } .. } new fruit( .. ); new fruit( .. ); foreach (Fruit f; fruit) { f.stuff(); }