assign to property 2 values

Dennis dkorpel at gmail.com
Fri Jul 9 11:04:23 UTC 2021


On Friday, 9 July 2021 at 10:19:59 UTC, Виталий Фадеев wrote:
> It possible in current version 2.097 ?

If you `import std.typecons` you can do:
```D
element.border = tuple(1, solid).expand;
```

But it's not pretty. I suggest either calling the function 
regularly, or combing all settings in a single struct:
```D
element.border = Border(/*width:*/ 1, /*solid*/ true);
```
Named arguments are not implemented yet, hence the comments.


More information about the Digitalmars-d-learn mailing list