assign to property 2 values
Виталий Фадеев
vital.fadeev at gmail.com
Fri Jul 9 10:48:53 UTC 2021
On Friday, 9 July 2021 at 10:19:59 UTC, Виталий Фадеев wrote:
> I want this feature in D:
>
> ```
> element.border = 1, solid;
>
> struct Element
> {
> @property
> void border( int width, BorderStyle style )
> {
> this.borderWidth = width;
> this.borderStyle = style;
> }
> }
> ```
>
> Description:
> ```
> element.border = 1, solid;
> ```
>
> will rewriten to the
>
> ```
> element.border(1, solid);
> ```
>
> This is same as @property.
> ```
> element.color = 0xCCC;
>
> @property void color( uint a ) { this._color = a; }
> ```
>
> but with 2 arguments, and more.
>
> It possible in current version 2.097 ?
I undestand what
element.border = 1, solid;
is
element.border = 1;
solid();
More information about the Digitalmars-d-learn
mailing list