Setter

Generates a setter for a field.

template Setter (
alias field
AccessModifier access = AccessModifier.Protected
string name = field.stringof[1 .. $]
) {
enum Setter;
}

Parameters

field

The field to generate the property for.

access

The access modifier for the setter function.

name

The name of the property functions. Defaults to the field name minus the first character. Meant for fields that start with underscores.

Meta