If you only want to add setters: ``` class Rect2D { int _width; int _height;
void width(int width) { writeln("SET"); this._width = width; } void height(int height) { writeln("SET"); this._height = height; } } ```
thebluepandabear via Digitalmars-d-learn Fri, 18 Nov 2022 20:05:41 -0800
If you only want to add setters: ``` class Rect2D { int _width; int _height;
void width(int width) { writeln("SET"); this._width = width; } void height(int height) { writeln("SET"); this._height = height; } } ```